ruby - Is while loop a good practice for cronjob alternative -


i want run following task daemon (infinite loop)

restart docker containers , tasks every 6:00 , 12:00

while true     docker-compose     docker exec ezuser_star_1 ruby star/star.rb&     docker exec ezuser_tiger_1 ruby tiger/tiger.rb&     busy_waiting_here except if 6:00 or 12:00 keep going     docker-compose down end 

is there suggestion gurantte above job can run months or years ?

i don't want cron

i need application level cronjob-like library

is there ruby dsl or library can let me kind_of job easier or robust.

if looking ruby scheduler, rufus scheduler best 1 know about.

https://github.com/jmettraux/rufus-scheduler


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -