The files created by Windows are \n\r ended, and Linux,mac this UNIX class system is \ nthe end.
Crontab Entry Examples
Here are some examples of C R o N T a b file entries:
21* * */apps/bin/cleanup.sh
The above example shows that 2 1:3 0 per night run/a p p s/b i n the directory C l e a n u p. S H.
4 1,10,22 * */apps/bin/backup.sh
The above example shows that the 1, 1 0, 2 2nd of the 4:4 5 run/A p p s/b i n directory b a c K U p. S H.
1 * * 6,0/bin/find-name "core"-exec rm {};
The above example shows that 1:1 0 per Saturday, Sunday runs an f i n d command.
0,30 18-23 * * */apps/bin/dbcheck.sh
The above example shows the D b c h e c K in the 1 8:0 0 to 2 3:0 0 run every 3 minutes/a p p s/b i n directory. S H.
0 * * 6/apps/bin/qtrend.sh
The above example shows the 11:0 0 p m running per Saturday/a p p s/b i n directory of q t r e N d. S H.
1. Login with root permission
2, Crontab-u lsbi-e
3. Join the command to start, such as 4 * */oracle_backup/bin/scott_select.sh
4. Restart Service Crond Restart
5. OK
Execute scripts within/etc/cron.hourly per hour
* * * * * Root run-parts/etc/cron.hourly
Execute scripts within/etc/cron.daily daily
4 * * * Root run-parts/etc/cron.daily
Execute scripts within/etc/cron.weekly every week
4 * * 0 root run-parts/etc/cron.weekly
Every month to execute scripts within the/etc/cron.monthly
4 1 * * Root run-parts/etc/cron.monthly
#! /bin/sh
Datetime= ' date-d -1day +%y%m%d '
bk= "sosobaike-"
Sosobaikedelname=${bk}${datetime} "-del_result"
Sosobaikeinsertname=${bk}${datetime} "-insert_result"
Wenwen= "wenwen-"
Wenwendelname=${wenwen}${datetime} "-del_result"
Wenweninsertname=${wenwen}${datetime} "-insert_result"
Dir= "./data/"
Hadoop jar Data_push_monitor.jar Com.sogou.july.push_data_monior. Pushdatamonitor
Cat ${dir}${bk}${datetime} "-del" |./dbnetget_256-i Url-o t-d csum-l./offsum576_address_list > ${dir}${sosobaikeDe LName}
#sudo rm-r ${dir}${bk}${datetime} "-del"
#cat ${dir}${bk}${datetime} "-insert" |./dbnetget_256-i Url-o t-d csum-l./offsum576_address_list > ${dir}${sosobai Keinsertname}
#sudo rm-r ${dir}${bk}${datetime} "-insert"
#cat ${dir}${wenwen}${datetime} "-del" |./dbnetget_256-i Url-o t-d csum-l./offsum576_address_list > ${dir}${wenwen Delname}
#sudo rm-r ${dir}${wenwen}${datetime} "-del"
#cat ${dir}${wenwen}${datetime} "-insert" |./dbnetget_256-i Url-o t-d csum-l./offsum576_address_list > ${dir}${wen Weninsertname}
#sudo rm-r ${dir}${wenwen}${datetime} "-insert"
#java-CP Data_push_monitor.jar Com.sogou.july.push_data_monior. Storagerates