A scheduled task fundamentally consists of three things: the task itself, the jobs that do the scheduling by defining when the task that is being run and when it is permitted to run, and finally, the job registry that executes this job.
Commonly, these are implemented by using cron on Linux servers. You add a line to the configuration
file using the following configuration syntax:
# ┌───────────── min (0 - 59)
# │ ┌────────────── hour (0 - 23)
# │ │ ┌─────────────── day of month (1 - 31)
# │ │ │ ┌──────────────── month (1 - 12)
# │ │ │ │ ┌───────────────── day of week (0 - 6) (0 to 6 are Sunday to
# │ │ │ │ │ Saturday, or use names; 7 is also Sunday)
# │ │ │ │ │
# │ │ │ │ │
# * * * * * command to execute
You can ordinarily edit the cron
file by running crontab -e
in the command line. You can schedule any Linux command using this pattern. Here's a cronjob that...