*/10 * * * * /code/kafka_venv/bin/python /code/kafka_engine/redis2mysql.py >> /code/logs/redis2mysql.log 2>&1 */10 * * * * /code/kafka_venv/bin/python /code/kafka_engine/schedule_job.py >> /code/logs/schedule_job.log 2>&1 */20 * * * * /code/kafka_venv/bin/python /code/kafka_engine/main.py >> /code/logs/main.log 2>&1
# 这个东西是有延时的,所以写入文件不要着急哦 crontab -l crontab -e
/sbin/service crond start //启动服务 /sbin/service crond stop //关闭服务 /sbin/service crond restart //重启服务 /sbin/service crond reload //重新载入配置