【发布时间】:2020-06-16 04:49:04
【问题描述】:
我有一个 python 脚本,它生成一个 csv 文件,然后使用 nodejs 脚本将 csv 文件转换为 xmls 文件,最后使用另一个 nodejs 脚本将 xmls 文件导入到谷歌电子表格中。
我希望能够运行一项每天自动执行一次的 cron 作业。
以下是我必须按顺序手动使用的命令列表:
1- Cd to this project director Otomoto_project_final/otomoto_final_project/otomoto
2- Run a python script called otomoto.py ( this will generate an output.csv file )
3- Cd back up .. to this path Otomoto_project_final/otomoto_final_project/
4- Run the following command : node csvtoxmls.js ( this will generate the otomoto.xlsx file)
5 - Run the following command : node main.js ( this will push the otomoto.xlsx file to the google spread sheet )
【问题讨论】:
-
google上有很多教程,像geeksforgeeks.org/how-to-setup-cron-jobs-in-ubuntu这样一步一步讲解,为什么还要在这里问?