Tuesday, January 19, 2010
can't edit cron solaris 10
This morning, there is a problem with the cron service misuse of one production server. Initial plan to edit the crontab file for user applications, but strange when doing cron-e that the contents of the file does not exist and can not add and insert the command in cron.
1. Check list file crontab
user_aplication@localhost # crontab -l
0 23 * * * /u02/applprod/backup_daily.sh
09 06 * * * /u02/applprod/backup_daily_up.sh
2. Try add and insert command
user_aplication@localhost # crontab -e
0
86
? [
(press ctrl+d, exit from editor cron)
user_aplication@localhost #
3. Check service cron
user_aplication@localhost # svcs cron
STATE STIME FMRI
online 9:08:01 svc:/system/cron:default
4. Solving problem,
a. edit file crontab
user_aplication@localhost # vi /var/spool/cron/crontabs/user_aplication
0 23 * * * /u02/applprod/backup_daily.sh > /dev/null 2>&1
09 06 * * * /u02/applprod/backup_daily_up.sh > /dev/null 2>&1
:wq!
b. refresh daemon cron
user_aplication@localhost # svcadm disable svc:/system/cron:default
user_aplication@localhost # svcadm enable svc:/system/cron:default
5. done
picture from googling..
Subscribe to:
Post Comments (Atom)
0 komentar:
Post a Comment