If you're using supervisor and have the logic to allow your processes to sleep, why not make your processes persistent and leave it to them to know when to run? You then have a clear separation of concerns, Supervisor makes sure the process is running (or stopped!) and the process makes sure it only does things when it should do.
On 10 June 2015 at 09:55, Aryeh Leib Taurog <v...@aryehleib.com> wrote: > I have a bunch of cron jobs that run `supervisorctl start suchandsuch` > and for the most part I make the processes themselves responsible for > exiting at the right time (say, after market close). > > I also make the processes responsible for handling changes in start > time due to other factors like daylight savings. The cron jobs start > everything before the earliest time and the processes sleep until the > correct start time for the current date. > > On Wed, Jun 10, 2015 at 02:36:34PM +1000, Steve Lorimer wrote: >> Is there a way to schedule a window during which a service should be >> running? >> >> Similar to cron, but managed through supervisord? >> >> [program:theprogramname] >> command=/bin/cat >> starttime=09:00:00 >> stoptime=17:00:00 >> dow=1-5 >> dom=* >> month=* >> >> If this isn't available in supervisord directly, what is the recommended >> way to achieve this? >> >> TIA >> Steve > >> _______________________________________________ >> Supervisor-users mailing list >> Supervisor-users@lists.supervisord.org >> https://lists.supervisord.org/mailman/listinfo/supervisor-users > > _______________________________________________ > Supervisor-users mailing list > Supervisor-users@lists.supervisord.org > https://lists.supervisord.org/mailman/listinfo/supervisor-users _______________________________________________ Supervisor-users mailing list Supervisor-users@lists.supervisord.org https://lists.supervisord.org/mailman/listinfo/supervisor-users