Crontab example

UNIX™ or Linux™ cron jobs can be scheduled with the crontab command. This command starts an editing session that creates a crontab file. The cron jobs and the appropriate times are defined within the crontab file.

The file can be customized with this command:
crontab -e
In this example, a cron job starts the shell script backup.ksh at 11:30 p.m. Monday through Friday and uses the SAP database utility BRBACKUP DB2® backup to back up the SAP database. This example shows the entry in the crontab file that starts the script for this scenario:
30 23 * * 1,2,3,4,5 /usr/bin/su - oraSID -c "/oracle/SID/sapscripts/backup.ksh"
30 23 * * 1,2,3,4,5 /usr/bin/su - db2c21 -c "/db2/C21/sapscripts/backup.ksh"