Hacker News new | ask | show | jobs
by chrisp_dc 3425 days ago
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...
3 comments

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

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.
Using a CI server as a scheduler? How is that at all the right tool for the job?