Schedule Crontab at 30 Seconds

Crontab doesn’t allow scheduling job duration in seconds. The minimum permitted duration is every minute only. But still, you can do some tricky configurations to run your script to run at every 30 seconds. For example, to run a shell script every 30 seconds use the following crontab configuration:

In the above configuration, we have scheduled the script twice. The first cron runs every 1 minute and the second cron also starts at the same time but waits for 30 seconds before execution. So the entire cycle runs every 30 seconds.

Wrap Up

In this quick how-to tutorial, you have learned to schedule a crontab job to run every 30 seconds.