DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

Cron Examples

4 years ago medium.com
Cron Examples

Summary: This is a summary of an article originally published by the source. Read the full original article here →

How to write a crontab schedule expression for:“At every minute.”* * * * * At every 2nd minute from 1 through 59.1–59/2 * * * *

For example, if you need to run X every 90 minutes, create one crontab entry that runs X every 3 hours on the hour (0 */3 * * *), and a second crontab entry that runs X every 3 hours with an offset (30 1/3 * * *).

If you wanted the mail not to be sent to anywhere, i.e to stop the crontab output to be emailed, add or update the MAIL variable in the crontab as shown below.

For example, instead of specifying /home/test/tape-backup, if you want to just specify tape-backup, then add the path /home/test to the PATH variable in the crontab as shown below.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com