Section
2, Task 4: Set Up Your Production Job Action 2: Schedule the production job(s) |
|
crontab
file to execute your scripts that process, reduce and
report on the data. You will be adding jobs to your crontab file. Retrieve your current crontab file with the following command:
crontab -l > my_crontab
Add the following lines to my_crontab
:
# Backup your pdb at 00:04 every night
04 00 * * * cp -r /u/me/pdb-production /u/me/pdb-backup 2>&1 | mail your_userid
# Run CxPROCES and CPREDUCE at 00:05 every night
05 00 * * * /tmp/pr_script
2>&1 | mail
your_userid
# Daily reports each morning at 03:05
05 03 * * * /tmp/csbatrep
-d 2>&1 | mail
your_userid
# Weekly reports each Sunday morning at 03:20
20 03 * * 0 /tmp/csbatrep
-w 2>&1 | mail
your_userid
# Monthly reports each first day of month at 03:35
35 03 1 * * /tmp/csbatrep
-m 2>&1 | mail
your_userid
where your_userid
is your e-mail address, pr_script
is the script that processes and reduces raw data
into your PDB, and csbatrep runs the
reports on the data in the PDB.
Issue the following command:
crontab my_crontab