Range of day (minute accuracy)

14 views
Skip to first unread message

jesus oliver

unread,
Apr 7, 2021, 6:10:50 AM4/7/21
to schedulix
Hi Ronald,


The thing is that we are in 2.9 now but I can't locate the option to get minute accuracy for time scheduling.

I feel kind of lost with this. 

Is there any feasible choice of getting minute accuracy without modifying Zope configuration? 

Kind Regards,

Jesus 

Ronald Jeninga

unread,
Apr 7, 2021, 6:43:44 AM4/7/21
to schedulix
Hi Jesus,

I actually vaguely remember the thread.
But after having upgraded to 2.9, you now have the (graphical) Interval Editor at your disposal.

Now I'll give you an example implementation.
The task is to launch every minute, except between 21:12 and 23:17.

This can be done in two steps:
1. create an Interval to be used as a filter, that filters out the daily period of 21:12 to 23:17
2. create a schedule with a repeat 1 and have it filtered by the interval you've created in step 1.

In pictures:

1. the filter interval
jesus_interval.png

Note that I didn't save yet, just to show you how to define it.
The INVERSE flag makes the list excluding. Hence if used as a filter, the time between 21:12 and 23:17 won't qualify.
Of course you'll have to save the interval first before you can use it.

2. the schedule with the repeat that uses the interval as a filter
jesus_schedule.png

As Repeat I've used 121 minutes and I've made the Calendar active. This way the next 5 trigger times are visible.
Obviously, 20:10 + 2h01' = 22:11. But since that falls within the range between 21:12 and 23:17, my JOB1 won't be submitted at that time.

I hope you're less lost now :-)

Best regards,

Ronald

jesus oliver

unread,
Apr 8, 2021, 4:59:01 AM4/8/21
to schedulix

Many thanks Ronald,

I'd like to control the minute 'accuracy' to shedule a simple task, as I said, without modifying Zope config.

Nevertheless, your suggested solution would be helful in some situations.

Best regards,

Jesus

Ronald Jeninga

unread,
Apr 8, 2021, 5:21:03 AM4/8/21
to schedulix
Hi Jesus,

the repeat 121 in my example was chosen to get a condensed list of next execution times that shows that the exclusion works. Naturally it'll work with a  repeat 1 too.
And nothing I did required a change in Zope.

Maybe I didn't understand your requirements?
In the original post you wrote:

> I need to run a job every minute over all the day, but between 22:30 and 22:40 this job should not be executed.

This is exactly what I've built if you disregard the repeat factor (121 instead of 1) and excluded period (21:12 - 23:17 instead of 22:30 - 22:40).
But from the logical point of view it's all the same. (Oh, and in your case I wouldn't activate the Calendar as I did. No need to store 1430 next execution times per day).

Best regards,

Ronald

jesus oliver

unread,
Apr 8, 2021, 6:29:26 AM4/8/21
to schedulix
Hi Ronald,

You're right.

Sorry for the missunderstanding. I was asking rather for the folowing: " Is there any possibility that the "Range of day" interval has the selector every minute? You solved it with zope config changes. 

As I said, we wouldn't like to change zope config. I had the hope that, somehow, 2.9 version could change the accuracy in the time selector field to 1 minute.

In either case, this way, our isssue is almost solved. Thanks

Best regards,

Jesus
Reply all
Reply to author
Forward
0 new messages