网站更新内容:请访问: https://bigdata.ministep.cn/

mac的crontab 调度

mac的crontab 调度

mac的cron

mac的cron调度默认是从分钟开始,没有秒,这点要注意;

mac的cron调用python

即使安装了anaconda ,环境变量base 是 anaconda 默认的python,但是在cron 调度仍然使用mac系统自带的python

macOS and Linu

  • Open a terminal window.

  • If you want the location of a Python interpreter for a conda environment other than the root conda environment, run conda activate environment-name.

  • Run which python.

示例

35 09,10,11,12,13,14,15 * * 1,2,3,4,5  /Users/xxx/anaconda3/bin/python   /Users/xxx/OneDrive/python/spyder_projdect_py/stock/run.py  >>/Users/xxx/Downloads/logs/$(date +"\%Y-\%m-\%d")stock_py.log 2>&1

参考

Finding your Anaconda Python interpreter path — Anaconda documentation

posted @ 2022-02-09 19:52  ministep88  阅读(183)  评论(0编辑  收藏  举报
网站更新内容:请访问:https://bigdata.ministep.cn/