Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Note: Proofread any scripts before using. Always try scripts on a test instance
first. This Blog is not responsible for any damage.
Crontab Syntax:
"crontab -e" to edit the cron entries and "crontab -l" to list the cron entries
*
*
* *
*
command to be executed
- |
|
| |
|
|
|
| |
+----- day of week (0 - 6) (Sunday=0)
|
|
| +------- month (1 - 12)
|
|
+--------- day of month (1 - 31)
|
+----------- hour (0 - 23)
+------------- min (0 - 59)
For example:
A line in crontab file like below:
To submit a task to run every hour at 15 minutes past the hour on weekdays (days
1-5)
15 * 1-5 * * /oracle/scripts/truncate_listener.sh > /dev/null 2>&1
To submit a task to run every 15 minuteson weekends (days 6 and 0)
00,15,30,45 * 0,6 * * /oracle/scripts/truncate_listener.sh > /dev/null 2>&1
Changing the parameter values as below will cause this command to run at differe
nt time schedule below :
min
hour
day/month
month day/week
Execution time
30
0
1
1,6,12 *
20
5,10
0
very month
10
1-5
1,10,15 *
10
Group
---------7 (g+rwx)
6 (g+wx)
5 (g+Rx)
4 (g+r)
2 (g+w)
1 (g+x)
World
---------7 (o+rwx)
6 (o+wx)
5 (o+Rx)
4 (o+r)
2 (o+w)
1 (o+x)
Permission
----------------------read + write + execute
write + execute
read + execute
read only
write only
execute only