Page 46 - Raspberry Pi as a Foundation for Boosting Computer and Technology Literacy
P. 46
3 Fundamentals of the Linux system and terminal usage
Figure 3.20 Adding a cron job
Figure 3.21
A working reminder
The job’s definition adheres to a certain standard. First, there is a
schedule at which a command must be executed. It is represented in
terms of five numbers that stand for minute, hour, date, month, and
weekday. The asterisk ‘*’ character stands for ‘every/any’. Finally, the
command is specified.
In our case, we would like the command to execute at “every 0 min-
th
ute of every hour, every day”, which is translated into “0 * * * *”. As
for the command, first, we specify the display on which to show the
reminder (i.e. the zeroth display). This is the only display if only one
monitor is connected. Then, we call the xmessage tool, which will dis-
play a window with our message inside, which disappears after three
seconds (Figure 2.21).
Modifying the command prompt
What if the default command prompt looks boring, and we would like
to change it? The answer lies in the home folder, specifically in the
“.bashrc” file. This is a configuration file that is checked and executed
every time a new instance of the bash shell is launched. The variable
46