Linux Cron – Can a Cron Job Run More Frequently Than Every Minute?

cronlinux

Is it possible to run a cron job every 30 seconds without a sleep command?

Best Answer

If your task needs to run that frequently, cron is the wrong tool. Aside from the fact that it simply won't launch jobs that frequently, you also risk some serious problems if the job takes longer to run than the interval between launches. Rewrite your task to daemonize and run persistently, then launch it from cron if necessary (while making sure that it won't relaunch if it's already running).