I would like to run for example a synchronizing ruby script (in rails action if it’s possible) between two databases every day at 3AM. It’d would be nice to have those times stored in a database, because if the synchonization fails I’d like to set it to try it again in an hour (and in database I can easily change it to every day at 5AM if I’d wanted to, even other admins in administration of my application). I would like to have the script in one of actions in my Rails application, so I can create a page in administration where just by clicking the link the script would run (not necessary, it can be in a separate Ruby file, which action would call eventually, but it would be nicer to have it as actions in a dedicated controller, because I’ll have many scripts like this one and I just like having similar things in a one place). Is this somehow possible without things-I-dont-know-anything-about-yet like cron?
Share
If you don’t want to deal directly with cron, have a look at whenever. It provides a nice syntax for writing cron jobs: