Created
July 1, 2025 18:27
-
-
Save trycf/af82ee20a9e140ab8274b4383b583ca0 to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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