centos7中crontab定时计划任务5分钟一次命令写法
1.输入命令:
[root@master ~]# crontab -e
2.添加:
*/5 * * * * /usr/share/nginx/spark_run_nginx_log.sh 2&>1 >> /usr/share/nginx/crontab_spark_run_nginx.log
3.等待验证:
[root@master ~]# cd /usr/share/nginx/ [root@master nginx]# ls crontab_spark_run_nginx.log metastore_db run_log.sh derby.log modules spark_run_nginx_log.sh html nginx_log.py test_log_records_add.sh [root@master nginx]# cat crontab_spark_run_nginx.log 18年 08月 02日 星期四 11:25:01 CST job start... --- rm hdfs output_nginx --- --- rm url information --- Deleted /user/flume/nginx_log_output_need/url/20180802 --- rm url information ok--- --- rm ip404 information --- Deleted /user/flume/nginx_log_output_need/ip404/20180802 --- rm ip404 information ok--- --- rm hdfs output_nginx Done --- --- spark-submit ---
总结
相关推荐
liguojia 2020-10-20
木子李CSDN 2020-06-05
kernelstudy 2020-05-21
playlinuxxx 2020-05-08
IsanaYashiro 2020-04-22
fenxinzi 2020-04-07
山兔与孟婆 2020-03-28
stoneechogx 2020-02-17
onlykg 2020-02-15
大老张学编程 2020-02-09
linuxisperfect 2020-01-09
liuyh 2019-12-22
蜀川居 2013-08-05
happywxp 2013-03-27
chenzelin 2013-03-31
NeverAgain 2019-12-13
mieleizhi0 2019-12-05
ningningmingming 2019-11-13
playlinuxxx 2013-09-02