user account’s crontab file. In this file, commands run on permissions from
the user. If one wants commands to run on the system’s approval, one will
use the sudo crontab -e command. This command helps the user to access
the root account’s crontab file. The system may ask one to select an editor
and in most cases, select nano. Nano is selected in many cases as it is the
easiest to use. Selection is made by simply typing the number of the editor
and pressing enter.
2.
Adding
new tasks
After opening the crontab, the user will use the page down tab to move to
the bottom of the file. From there, they can schedule their tasks. There is a
specific format required to be followed when scheduling tasks or
automating them. Setting the time for the tasks to begin, one used the
following format
minute (0-59) hour (0-23) day (1-31) month (1-12)
weekday (0-6) command. In this command, it is imperative to note that in
minutes and weekdays, the first is 0 this means that
the first day of the week
will be given zero, thirty minutes will be 29 and so on. The asterisk (*) is
used to show repetition and can be used to represent any value. For
example, if you want a command to run every day at 12.30 am, the
command will be as follows.
29 0 * * * /usr/bin/ example
Use values separated by commas to specific multiple times. For instance, a
line such as
0,14,29,44 * * * * /usr/ bin/ example2
runs
/usr/bin/example2 at the 15-minute mark on every hour, every day.
Make sure you add each new task on a new line.
3.
Save the file
Once
you have scheduled the tasks, the user can then save them as they
want. The saving process is achieved through the use of
Ctrl - O then
enter.
After saving the file, one can exist by merely using the shortcut
Ctrl - X.