Home>

1. Enter the command:

[[email protected] ~] #crontab -e

2. Add:

*/5 * * * * /usr/share/nginx/spark_run_nginx_log.sh 2>1>/usr/share/nginx/crontab_spark_run_nginx.log

3. Wait for verification:

[[email protected] ~] #cd/usr/share/nginx /
[[email protected] 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
[[email protected] nginx] #cat crontab_spark_run_nginx.log
Thursday, August 02, 2018 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 ---

to sum up

  • Previous Example of ajax method wrapped by native js
  • Next How to distinguish between USB flash drive and SD card device in Android 60