Run a cronjob more than once a minute

I needed to run a cronjob to log some stats every 15 seconds. Cron only allows you run a command at minimum once a minute. This presents a problem, but you can cheat using sleep to get around it.

* ~/logging_script.pl ; sleep 15 ; ~/logging_script.pl ; sleep 15 ; ~/logging_script.pl ; sleep 15 ; ~/logging_script.pl

Leave A Reply
All content licensed under the Creative Commons License