crontab comment
# This is a comment
0 0 * * * /usr/bin/magiccronjob
crontab comment
# This is a comment
0 0 * * * /usr/bin/magiccronjob
syntax crontab
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user command to be executed
example :
# 50 12 * * * ----- run every day at 12.50
# */5 * * * * ----- run every 5 minutes
cron
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
# Set the hardware clock to keep it in sync with the more accurate system clock
03 05 * * * /sbin/hwclock --systohc
# Perform monthly updates on the first of the month
# 25 04 1 * * /usr/bin/dnf -y update
crontab
crontab -e # to edit (then 'i': insert, ':wq!': save and quit)
10 * * * * /bin/sh backup.sh # every hour at 10"
0 */4 * * * /bin/sh backup.sh # every 4 hours at 0"
0 9-17 * * * /bin/sh backup.sh # every hour at 0" between 9 and 17
0 2 * * * /bin/sh backup.sh # daily at 2am
0 0 * * MON /bin/sh backup.sh # every Monday at 0am
0 0 * * 1-5 /bin/sh backup.sh # daily from Monday to Friday at 0am
0 0 * * 0 /bin/sh backup.sh # weekly on Sunday
0 0 1 * * /bin/sh backup.sh # monthly (1rst day at 0am)
0 0 1 */3 * /bin/sh backup.sh # every quarter (1rst day at 0am)
0 0 1 1 * /bin/sh backup.sh # yearly (01/01)
crontab
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- weekday (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user command to be executed
10 * * * * /bin/sh backup.sh # every hour at 10"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us