(1) nano /etc/crontab
make a routine job.
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,$
# | | | | |
# * * * * * user-name command to be executed
# run-parts
# 12:00 24:00 execute abc this file
* */12 * * * root /home/luke/daily/abc
(2) make a executable file
#!/bin/bash
#
#********************************************
#* *
#* crontab *
#* 30 November, 2011 *
#* *
#* created by: Freeman *
#* *
#* *
#********************************************
source /opt/export_env
cd /home/luke/daily/
cvs checkout NTGR_D3_CableRG
cp -f /home/luke/daily/.config /home/luke/daily/NTGR_D3_CableRG/Porting/Build/
cd /home/luke/daily/NTGR_D3_CableRG/Porting/Build/
make clobber
make clean
make
0 意見:
張貼留言