Home News WebDev Links About Garden Notes LAMP Stack Using Git Using SSH/SFTP Linux Commands

cron

Linux

Wikipedia

The software utility cron also known as cron job is a time-based job scheduler in Unix-like computer operating systems. Users who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration—though its general-purpose nature makes it useful for things like downloading files from the Internet and downloading email at regular intervals. The origin of the name cron is from the Greek word for time, χρόνος (chronos).

How To's

My crontab (on server)


# For details see man 4 crontabs

# 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


# back up d8 fofa-test daily at 5:21 - stopped 7/19/19
#21 05  *   *   *   /bin/bash   /home/ubuntu/backup

# back up d8 fofa-test at 23:12 every Friday - started 7/19/19
12  23  *   *   FRI /home/ubuntu/backup

# sillytest
#44 *   *   *   *   ls>/home/ubuntu/lstest