Here we will show an example of creating and running a user crontab file.
Be sure your system is set up as outlined in the Introduction. We will be using two terminal sessions, to see our results more easily.
The following is an example of how to create and run a crontab file:
In a terminal session run
tty
and remember the output. This will be used in step 10.Open or use another terminal under a user account. I'll be using
jklewis
as in earlier chapters.Let's view the crontab file by running the following command:
crontab -l
It may say something like
no crontab for jklewis
which is fine.Now let's make one by running the following command:
crontab -e
It may say something like
no crontab for jklewis - using an empty one
which is good.Crontab should bring up a temporary file in vi (unless you have changed the
EDITOR
variable as I have, on my system). The file will not be used until it has been saved and the session has been ended...