Cron - How can I create a cronjob that runs every 15 seconds?

You need to write a shell script like this that sleeps on the specified interval and schedule that to run every minute in cron:

#!/bin/sh
# Script: delay_cmd
sleep $1
shift
$*

Then schedule that to run in cron with your parameters: delay_cmd 15 mycommand parameters


Cron mandates the seconds to be there, as far as I knew.

"0/15 * * * * *"

sec min hour day-month month day-week (optional year which I left out)

EDIT: It appears that while the CRON expression requires 6 or 7, the cron exec that runs it wants 5... I'll look into this!


I think you have to write a shell script which calls your command and then sleeps 15 seconds -- I don't believe most cron implementations allow for more than one minute granularity.