Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save trycf/af82ee20a9e140ab8274b4383b583ca0 to your computer and use it in GitHub Desktop.
Save trycf/af82ee20a9e140ab8274b4383b583ca0 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
entry = {
"time":18
,"dow":[false,false,true,false,false,false,false]
};
entry2 = {
"time":19
,"dow":[false,false,true,false,false,false,false]
};
entry3 = {
"time":20
,"dow":[false,false,false,true,false,false,false]
};
users = [entry, entry2, entry3]
function checkSend(obj) {
if (obj.time == timeFormat(now(), 'HH') && obj.dow[dayOfWeek(now())]) {
WriteOutput('true<br>')
return true;
}
WriteOutput('false<br>')
return false;
}
for(i=1;i <= arrayLen(users); i++){
checkSend(users[i]);
}
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment