Script schedule

Good afternoon!

I am working with an script schedule but is not executing, I thought was the version but is not.

I tried to search an example but I don't get it.

I mean if a create an example of script schedule, I should call the method ?

Thanks everyone

What makes you think it's not working/can you show exactly what you've configured? Post both your code as text in a preformatted text block, and a screenshot of how you've got things configured.

Configuration:

Script:

def onScheduledEvent():

    Findate=system.date.now()
	month = system.date.getMonth(Findate) + 1
	year = system.date.getYear(Findate)
    print (month)

ABout gateway scripts is never executed

  • Is the project itself enabled?
    • Gateway scripts won't run if their project is disabled.
  • Is the project inheritable?
    • Gateway scripts in an inheritable project are generally a bad idea, and they won't run unless there's at least one inheriting project.
1 Like

If that's your exact code, you're mixing up tabs and spaces, which is never a good idea:

I'll also ask the obvious question: has 2:30 AM happened yet?

1 Like

And if it has, did you look in the wrapper.log text file? (That's the only place a print in gateway scope goes.)

Am I need to enable this right?:

I am using a docker container , Can I still have the acces to this archive ?

You would need to open a shell into the container. docker exec IIRC. (I haven't been using docker much, lately.)

Consider using a logger instead of using print.

Also, inheritable projects do not actually run anything. Only leaf projects are actually runnable. (You should never define gateway or Vision client events in inheritable projects--unless you want madness and confusion.)

1 Like

I will change it by the next some minutes