Cron is the standard way to schedule jobs on Linux, but a small mistake can make a job run at the wrong time or far too often. Enter a cron expression below to see exactly when it will run next.
Cron Next Run Checker
Enter a cron schedule (minute hour day month weekday) to see the next 10 times it will run.
Times are calculated in the time zone of the device you are viewing this page on. If your server uses a different time zone (such as UTC), the results will be offset. Shortcuts such as @daily are supported.
Cron syntax in brief
- Five fields:
minute hour day-of-month month day-of-week. *means every value,,lists values,-sets a range,/sets a step (for example*/15).- Day of week: 0-7, where both 0 and 7 mean Sunday. Names such as MON-FRI also work.
Common pitfalls
- Day of month and day of week together: if both fields are restricted, the job runs when either matches.
0 0 13 * 5runs on the 13th of every month and every Friday, not only on Friday the 13th. - Time zone: many servers use UTC. Check with the
datecommand. - Environment: cron runs with a minimal PATH, so use full paths to commands and scripts.
- Logging: redirect output to a file, for example
command >> ~/cron.log 2>&1, so you can see why a job failed.

コメント