Schedule jobs like a boss with every

Scheduling jobs on cron is often a trial-and-error process but every, a command line app written in Perl makes it a lot easier.


You need to have cron, which comes with most Unix-based platforms (e.g. Linux, Mac OSX, BSD) and have Perl installed.

Get every

every was developed by Rebecca and is hosted on her Github page. You can download it directly from the command line using wget:

$ wget ''

Or curl:

$ curl -O ''

Save every to /usr/bin or add the parent directory to your PATH variable so you can run every from the command line.

Scheduling jobs with every

The command to every to schedule a job takes the form: “every [num] unit program” (num defaults to one). So for example if you wanted to schedule a shell script to run every minute, type the following:

$ every minute

Which creates the following crontab:

*/1 * * * * cd "/home/sillymoose";

every translates the command into a new crontab entry and prints it on the command line. Helpfully it will set the SHELL variable and copy the user’s PATH into the crontab. The icing on the cake is that every prepends a change directory command to ensure that cron executes the job from the script’s parent directory. By doing these things, every eliminates (probably) the three most common causes of failed cron jobs.

Other units that every recognizes are: hour, day, week, month and the day of the week (e.g. Wednesday). The following are all valid every commands:

$ every 10 hours

$ every mon

$ every 3 months

One really cool feature of modern cron installs is that you can schedule a job to run on reboot. every also supports this:

$ every @reboot

Further info

every has more options than described above. Run “every –help” to see the full panoply of options.

every was written in Perl by Rebecca. She is also on twitter (@ReBeccaOrg). So if you use every and find it useful, maybe reach out and say thank you.

This article was originally posted on


David Farrell

David is a professional programmer who regularly tweets and blogs about code and the art of programming.

Browse their articles


Something wrong with this article? Help us out by opening an issue or pull request on GitHub