【发布时间】:2020-06-26 06:30:22
【问题描述】:
我尝试安排我的 Python 脚本每天通过 cron 运行,但失败了,请问我的 MacBook 出现了什么错误?
- 在终端输入 crontab -e
-
将以下代码复制到 crontab
38 22 * * 0-6 $(which python3) /Users/mrcheung/Desktop/Python/Stock_Monitoring/Stock_monitoring_students_v6_lesson_2020.py 保存作业以输入 :wq
但是,我等不及作业正在运行,是否有任何缺少的步骤或语法错误?
0 22 * * 0-6 /Users/mrcheung/Desktop/Python/Stock_Monitoring/Stock_monitoring_students_v6_lesson_2020.py
You have mail in /var/mail/mrcheung
bash-3.2$ crontab -e
crontab: installing new crontab
bash-3.2$
【问题讨论】:
-
欢迎来到 SO。请在此处查看How to ask a good question
-
谢谢,但我可以知道这个问题已经被删除了吗?
-
它没有被删除。您的问题的问题很明确:我们需要当前的、预期的输出以及可能的任何错误跟踪。
-
所以任何人都可以帮助我解决问题?
-
这个
However, I can't wait the job is running, is there any missing step or syntax error?是什么意思。不是每天(星期日除外)22 小时执行吗?
标签: python cron scheduled-tasks