News:

We really need your input in this questionnaire

Main Menu

CRON schedule doesn't work?

Started by Millenium7, November 29, 2019, 04:15:52 AM

Previous topic - Next topic

Millenium7

I've created a scheduled task to run a script. I set CRON schedule to 0 * * ? * * * as a test to run the script every minute, but it never runs

Is there something i'm doing wrong? Do I need to turn on CRON scheduling in server options or something?
No problem in the script as it runs fine with one time execution (sends me an email), but if I use CRON it doesn't run at all

NetXMS version is 3.0.2329

Edit: Tried creating a dummy node and adding the script as a polling method with a CRON schedule, that too does not work. Yet setting the polling interval to i.e. 60 seconds works fine. So it seems CRON is completely broken in my instance, or i'm doing something wrong that i'm just not seeing

Tatjana Dubrovica

Cron tab to run script every minute should look like: * * * * *
We support cron expressions with only 5 parts: minutes, hours, day(month), month, day.
Also NetXMS does not support "?" symbol.

Millenium7

#2
Would be nice to have that documented somewhere. I searched for ages, found zero mention of it. Infact I found a few posts on these forums pointing to 'CRON generators' including the one that generated that
I'll test it out tomorrow

Edit: Yes using only 5 characters in the CRON schedule works as intended. Thank You. Just wish there was some information in the manual/guides or at least a little ? symbol in Schedule area's that when mousing over says something like "CRON format: [minute] [hour] [day of month] [month] [day] i.e. 5 3 * * * will run at 3:05am every day"