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.

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

Leave A Reply
All content licensed under the Creative Commons License