Re:Schedule – Python job scheduling for humans
by gvalkov on Saturday October 03, 2015 @08:29AM
(#10323611)
I find it hard to appreciate these inventive types of API design. Something more traditional and boring, like Celery's crontab[1] or dateutils rrule[2] seem quite sufficient. For example:
crontab(hour=18, minute=30, day_of_week='*')
[1]: http://celery.readthedocs.org/en/latest/userguide/periodic-t...[2]: https://labix.org/python-dateutil#head-470fa22b2db72000d7abe...
Re:Schedule – Python job scheduling for humans
by StavrosK on Saturday October 03, 2015 @08:33AM
(#10323619)
I'm not sure why, given two equally flexible designs, we should choose the least expressive. The fact that cron is sufficient doesn't mean I don't still have to google how to run things every three hours every second Monday, for example.
Re:Schedule – Python job scheduling for humans
by draegtun on Saturday October 03, 2015 @10:53AM
(#10324080)
I agree. This scheduler dialect for Rebol is pretty much the DSL you describe - http://softinnov.org/rebol/scheduler.shtml
Re:Schedule – Python job scheduling for humans
by anentropic on Saturday October 03, 2015 @01:22PM
(#10324574)
I'd rather have neither. I particularly dislike the .every().day.at("10:30").do(myfunc) thing where methods and attributes are abused in order to artificially make it read like a sentence.
This is not Pythonic at all <troll>it's like some childish Ruby code</troll>
Wouldn't it be better to have descriptions of:
Every day at 10:30 do myfunc
Every Monday do otherfunc
Every hour do whatever
Rather than the current .every().day.at("10:30").do(myfunc)?