How to setup a 30 second Cron job

Sometimes you need a cron job at a frequency less than the minimum of 1 minute (60 seconds) that cron allows. One way of achieving this is by placing a sleep in front of your job as follows :-

Show Plain Text
Text code
  1. # m h dom mon dow user  command
  2. * * * * * root /your/cron/job &> /dev/null
  3. * * * * * root sleep 30; /your/cron/job &> /dev/null

Another way this could be achieved is by calling a script with a sleep between the jobs.

Filed under: Linux  Tags: Debian, Ubuntu

0 Responses to “How to setup a 30 second Cron job”

Sorry, comments have been closed for this post.