This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Scheduled Script - Feb 31st
#1
Hi,

Sometimes I create scripts that should never be run automatically. This is usually for testing or convenience. I usually make these as scheduled scripts, so I can press "Run script" to execute the code.

As a scheduled script normally should be run automatically, you still need to fill in the cron format as to when the script should execute. Usually I just fill inn "* * 31 2 1", so that it should never execute automatically. This is February 31st, which will never occur.

I did however notice that the script is being executed automatically today. Is this expected behavior or is this a bug in your cronjob handling?

See the attached images. For now, I'll just have to disable the scripts, which is fine.

Edit: This bug occurred in another site I have such a script enabled. That was a lightshow script for floodlights at a football stadium. Every Monday the customer complained that the lights turned on a midnight and stayed on. I didn't connect this until now. So it seems the bug is that the script runs every Monday of February.

It might be in the spec of cronjobs, that when it runs into an invalid date, it runs on every occasion instead.

Attached Files Thumbnail(s)
       
Reply


Messages In This Thread
Scheduled Script - Feb 31st - by avolle - 21.02.2022, 15:59
RE: Scheduled Script - Feb 31st - by admin - 21.02.2022, 16:36
RE: Scheduled Script - Feb 31st - by avolle - 21.02.2022, 17:10

Forum Jump: