码迷,mamicode.com
首页 > 其他好文 > 详细

crontab post method

时间:2020-01-17 21:21:36      阅读:67      评论:0      收藏:0      [点我收藏+]

标签:ati   ade   div   stop   json   tracking   track   http   ini   

Step by step for crontab stop setup 
Sea@sea:/etc/lazada$ sudo crontab -e
1.Edit cron job
0 */6 * * * curl -X POST -d @/etc/lazada/lazada_tracking.txt  http://localhost:8080/booking/rs/LazadaService/post --header "Content-Type:application/json"
Chnage it like :
#0 */6 * * * curl -X POST -d @/etc/lazada/lazada_tracking.txt  http://localhost:8080/booking/rs/LazadaService/post --header "Content-Type:application/json"

2.restart cron job
Sea@sea:/etc/lazada$ sudo /etc/init.d/cron reload
Sea@sea:/etc/lazada$ sudo /etc/init.d/cron restart
3.check crontab if succeed start
Sea@sea:/etc/lazada$ sudo ps -ef| grep cron
root     30871     1  0 12:22 ?        00:00:00 cron

 

/etc/lazada/lazada_tracking.txt   json 数据--> 用于post 

crontab post method

标签:ati   ade   div   stop   json   tracking   track   http   ini   

原文地址:https://www.cnblogs.com/lshan/p/12207155.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!