Skip to main content

free tools / cron generator

Cron every 30 seconds

Cron cannot do this by itself: its smallest step is one minute. The usual workaround is two lines that both start every minute, the second one waiting 30 seconds first.

  1. Add one ping to the end of the job.
  2. Tell Uptimepage how often to expect it.
  3. A missed ping opens an incident and alerts you by Slack, email, PagerDuty, SMS or webhook.
alert me if this job stops

Free plan, no card. Opens the new-monitor form as a heartbeat check.

crontab -e
* * * * * /path/to/command * * * * * sleep 30; /path/to/command

Add both lines with crontab -e. Either one alone runs the command once a minute.

what to know

Both lines start each minute. The second sleeps for 30 seconds before it runs the command, so the command runs at :00 and :30.

The two runs know nothing of each other. If the command can take more than 30 seconds, guard it with a lock such as flock -n /tmp/job.lock /path/to/command.

For anything tighter, a systemd timer or a loop inside one long-running service fits better than cron.

For anything else, build it in the cron expression generator.

more free tools: uptime SLA calculator · error budget calculator · incident message generator · DNS lookup · HTTP header checker · SSL certificate checker · SSL certificate decoder · domain expiry checker · website security checker · the whole set