Trigger script/write to tag based on day and time


I’m trying to setup a script that will trigger at a specific day of the week and time.
my current issue is when i setup a button to run the script when its pressed just for testing . I get the following output please look at the console image. I’m supposed to see a number from 1-7 . I don’t know alot about coding but the instruction says it should return an integer between 1-7

ive attached the images with the sample code and console output

Missing parenthesis. And needs to be fed a date/time value. Like so:


Consider going through the generic tutorials on


I will and thank you very much