Re:Writing a cron job microservice with Serverless and AWS L...
by chrisp_dc on Monday January 30, 2017 @05:05PM
(#13525477)
Sounds like you might be better off using Jenkins than roll your own. I use Jenkins over cron when I want easier auditing & authentication. I got the idea to use Jenkins as a 1-size fits all hammer from https://www.cloudbees.com/blog/drop-cron-use-jenkins-instead...
Re:Writing a cron job microservice with Serverless and AWS L...
by mickael-kerjean on Monday January 30, 2017 @05:44PM
(#13525808)
Great to see I'm not the only one using Jenkins to look after crown jobs!
However, it's to me way more than simply auditing & auth. The main advantage I found with Jenkins are:
- you get a central place for all the cron jobs. That comes with all the advantages the most important one being nobody has to remember on which server is this freaking script
- making an update can easily be done
- running the task can even be done by non technical people.
- easy backup
- when a script become deprecated you can easily remove it and you're not very likely to let it there running for nothing forever
- easy documentation for you tasks
There's probably more but Jenkins is definitely awesome for cron jobs
Re:Writing a cron job microservice with Serverless and AWS L...
by philip1209 on Monday January 30, 2017 @07:20PM
(#13526337)
I've done this many times in the past. Add an authenticated "cron" endpoint, and have a jenkins job curl it every X seconds. It's not perfect, but it's an easy way to see log, alert Pagerduty, etc.
Re:Writing a cron job microservice with Serverless and AWS L...
by flukus on Tuesday January 31, 2017 @12:35AM
(#13528002)
Using a CI server as a scheduler? How is that at all the right tool for the job?
Re:Writing a cron job microservice with Serverless and AWS L...
by philip1209 on Monday January 30, 2017 @07:19PM
(#13526323)
I've been burned by bad cron monitoring many times in the past. Short answer: check out https://cronitor.io/. Basically, finish every cron job by telling their server that the job finished. It's good enough monitoring for most cases.
Re:Writing a cron job microservice with Serverless and AWS L...
by wmfiv on Monday January 30, 2017 @04:47PM
(#13525344)
Something like http://www.easybatch.org/ may provide quite a bit of the infrastructure you're looking for. I'm sure there are equivalents for other languages.
Cron is hard. Not in the sense that its challenging to set up but its a challenge to maintain and have visibility into. It seems like you need a whole set of infrastructure just to feel confident that things are running as intended.
This has always lead me down the path of building a task manager type of micro-service running on an independent server to manage everything. But by the time im done, it feels like over kill. I just don't know what to do differently. Am I missing something?