Rule machine question about scheduling timed execution

Either I am doing something wrong or the rule machine hourly scheduling is broken.. it is not scheduling the 1 am run .. even though set to every 12 hours.


That cron expression is for every 12 hours starting at 1 PM. You can verify that here: Free Online Cron Expression Generator and Describer - So the evidence that you've shown is that it is scheduled correctly.

Where are the logs to substantiate what you are saying? I somewhat doubt that the scheduler is not working, but, heck, it fails for DST change so who knows what it's capable of failing at?

it was schedule a day ago.. so why is the 1 am not. scheduled.. what logs would i get and where..

there is no data under events for the rule.. where else would i look?

i see this under the app whilch shows it trigger at 1 (doesnt say pm) yesterday so i assume it should have rescheduled for 1 am ..

i updated the rule iteself loggin so when it fires at 1 pm tommarow i will have the logs and will show you that if it doesnt schedule again for 1 am

Enable logging in your rule as described in this document (tl;dr - select at least "Trigger" logging under the "Logging" drop-down, though anything else wouldn't hurt too). Then you will find them in "Logs," either the default current logs if the page was open at the time or "Past Logs" if you are looking after the fact.

Bruce is asking if you can see something for 1:00 PM (you should, based on this) but not 1:00 AM (that part is unclear). That being said, I'm not sure if he saw the bit about the "Next Run Time" and "Prev Run Time" values for "Scheduled Jobs," which is suspicious--but this is one way to actually prove it.

ya unfort. not going to be able to go back that far and i didnt have loggin on as i didnt forsee any problem with the rule.

Enable them and see what happens next time?

EDIT: Or add some definitive action to your rule, maybe a notification as the first action, if you don't trust being able to see Past Logs (or live) soon enough.

It is scheduled. The cron string means every 12 hours starting at 13:00 hours (1 pm). There won't be a separate schedule than the one you've shown.

Yes, last time it ran, according to that was at 1 am. It never "reschedules", the schedule it has, that you showed, is the entire schedule.

Rules don't post events.

here is the proof that it ran at 1 pm today.. ie the log message in the rule itself.. and above i showed you what it is now schedule for.. 1 pm again instead of 1 am..

No, it is scheduled for every 12 hours, so both 1 am and 1 pm.

ok then i misunstand as i said what run every 12 hours starting at 1 pm means.. so if it is not rescheduling.. it should still run at 1 am then.. i guess i missunderstand as i said as was expecting to see a pending event in the schedule.

sorry if i am wrong.

if so the title next run time in periodic scheduler at 1 pm is very misleading if it is indeed going to run at 1 am


0 0 13 * * ? *

would be every day at 1 pm.

1 Like

Periodic Schedule in RM is a front-end for cron string creation. That's all it does, and everything it comes up with is a single cron string -- and those strings define a precise and complete schedule in those few characters. You can use any cron string you want, if you want, and use the website linked above to come up with them.

thanks makes sense guess when reading the info shown periodic scheduler with next run time at 1 pm is just misleading.

so i assume it is added to some sort or crontab just like normal linux.

I don't know where it gets that "Next run time", and it's relationship to the cron string. That is misleading. I'll do a little test...

i was just re visiting the rule to make sure it was running as designed and the variables were updating.. is there a better way to do a rule like this.. while i have you on the line? It seems kinda kludgy to me.

Logs are your friend. Leave a Logs tab open 24/7, and clear it out or refresh as needed.

Can't speak to kludgy comment. As for the scheduling, there is no more efficient way to do it than a cron string.

Like I said, I don't know whether or not it is working. I know the cron string is right. The only certain way I know to discover that it works as expected is by looking at the logs (Event and Trigger logging must be on, and probably Action as well).

There are times I have to let things run for days to convince myself they work right. Debugging Mode Manager is painful, because the only way to figure out if something before sunset works as expected, with earlier of two times, is to wait until tomorrow to see, and maybe the next day.

1 Like

i didnt mean the comment was kludgy i meant the way i wrote the rule. i have logging on now so will let you know in 4 minutes lol

nothing seemed to run at 1 am so there does seem to be some issue somewhere..

all logs are on in the rule.

could be because i updated the rule.. with turning logging on it changed the time to 1 pm again.. will let you know tomorrow if it continues to only run at 1 pm.

I'm way beyond being able to look at rules and say they are kludgy or not. It does seem kludgy, but heck, does it do its job?

I found some code in RM the other day that is just friggin' awful -- makes me want to puke. But, I know for a fact that it works correctly. One of these days I will rewrite it so I don't want to puke when looking at it. But, it's so bad that it's brain damage to figure out how it works, which is sort of necessary to rewrite it.