linux环境crontab定时执行python脚本

612 阅读1分钟

一、crontab -e 配置

*/1 * * * * python /usr/local/yunji/python/init_warehouse_stock.py >> /tmp/warehouse_stock_cron_log.txt

二、重启crontab服务

  • service crond start 启动crontab服务
  • service crond stop 停止crontab服务
  • service crond restart 重启crontab服务

三、查询crontab服务日志

tail -f /var/log/cron