DEV Community

Scotticles
Scotticles

Posted on

Jenkins for running scripts!

I have over 30 scripts that are used to pull data and push data between different services. Its critical to know when they fail. Sure you could do this with cron but then I looked around and saw that Jenkins could run scripts and have a console output log, and email me on fails.

After you have set up jenkins and set up the email settings.

  1. Create a freestyle project
    1. Build Triggers -> set your time so it runs whenever you want.
    2. Build Steps -> Add Build Step -> Execute Shell perl <my/path/to/script.pl
    3. Post Build -> Email Notification and make sure Send Email for every unstable build is checked.

This will get your scripts running and have email alerts on failed scripts. Its super helpful and its nice to have a decent web ui to automate and organize all these jobs I have to run.


If anyone has a better system / suggestion please let me know, I like what I have but I have been looking for something not so heavy on Java.

Top comments (1)

Collapse
 
simongreennet profile image
Simon Green

in our organization, we use Apache Airflow that replaced running crons. It's open source, and written in Python. It also has the ability to send e-mails on failures, and I'm the poor guy that gets those errors :P

It also has pretty decent documentation. Like any application, there is a bit of a learning curve, but nothing too complex.