I want to know whether there is any easier way to run a job every 25 minutes. In cronjob, if you specify the minute parameter as */25, it'll run only on 25th and 50th minute of every hour
Linux – CronJob Every 25 Minutes
cronlinux
cronlinux
I want to know whether there is any easier way to run a job every 25 minutes. In cronjob, if you specify the minute parameter as */25, it'll run only on 25th and 50th minute of every hour
Best Answer
The command in crontab is executed with
/bin/sh
so you can use arithmetic expansion to calculate whether the current minute modulo 25 equals zero:cron
will run this entire entry every 5 minutes, but only if the current minute (in minutes since the epoch) modulo 25 equals zero will it runyour_command
.As others have pointed out, 1 day is not evenly divisible by 25 minutes, so this will not cause
your_command
to run at the same time every day, but it will run every 25 minutes.