python - Cron 作业如何工作?
问题描述
从最近几天开始,我一直在寻找一种在特定时间重新启动脚本的方法。那是我被介绍给 Cron Job 的时候。我是通过一个链接来的
https://marketplace.visualstudio.com/items?itemName=mkloubert.vs-cron#jobs-
其中说明了如何在 settings.json 文件中使用使用 cron 作业。我已经在 Visual Studio 中下载了扩展名,并使用命令指定了文件的位置。我做了一个代码: -
{
"python.pythonPath": "/usr/bin/python3",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"cron.jobs": {
"jobs": [
{
"name": "Rebooting the software",
"description": "Rebooting the software three times in a day.",
"time": "0,0,17 0,12,10 * * * * *",
"action": {
"type": "command",
"command": "/home/pi/Schreibtisch/PSTecSoftware/AccessControlRepository/AccessControl/DevicesWrapper.py.extension.cronJons.restartRunningJobs"
}
}
]
}
}
它不工作我真的不知道我应该做些什么改变才能让它工作。
解决方案
推荐阅读
- javascript - 如何在Javascript中的for循环中加入字符串?
- html - Bootstrap 列垂直堆叠而不是水平堆叠
- android - ADB 中的未知命令 tcip
- python - 你如何编写一个程序来检查输入是否符合语法?
- javascript - 如何将类方法作为事件添加到 html 按钮
- ruby-on-rails - 验证的最大字符数无法正常工作
- python - 未找到 json 文件 - 初始化 gspread 时出现问题
- go - 如何从 grpc-gateway 发送错误正文?
- c++ - cin 如何将字符串读入字符串类的对象?
- django - 如何优化默认 Django oscars App Views 尤其是目录 App Views?