Answers for "how to find th erunning crontabs in linux"

0

how to check crontab list

To list all scheduled cron jobs for the current user : crontab –l
To display contents of the root user’s crontab : less /etc/crontab
To list cron jobs that belong to a specific user : sudo crontab –u username –l
To list hourly cron jobs : ls –la /etc/cron.hourly
To list daily cron jobs : ls –la /etc/cron.daily
To display weekly cron jobs : ls –la /etc/cron.weekly
To display monthly cron jobs : ls –la /etc/cron.monthly
Posted by: Guest on May-21-2021
2

crontab in linux

crontab -e						

10 * * * * /bin/sh test.sh    # every hour at 10"
0 */4 * * * /bin/sh test.sh   # every 4 hours at 0"
0 9-17 * * * /bin/sh test.sh  # every hour at 0" between 9 and 17
0 2 * * * /bin/sh test.sh     # daily at 2am
0 0 * * MON /bin/sh test.sh   # every Monday at 0am
0 0 * * 1-5 /bin/sh test.sh   # daily from Monday to Friday at 0am
0 0 * * 0 /bin/sh test.sh     # weekly on Sunday
0 0 1 * * /bin/sh test.sh     # monthly (1rst day at 0am)
0 0 1 */3 * /bin/sh test.sh   # every quarter (1st day at 0am)
0 0 1 1 * /bin/sh test.sh     # yearly (01/01)
Posted by: Guest on August-17-2021

Browse Popular Code Answers by Language