Python Cron作业是如何工作的?
从最近几天开始,我一直在寻找在特定时间重新启动脚本的方法。就在那时,我被介绍认识了克朗的工作。我通过一个链接 说明如何在settings.json文件中使用cron作业。我已经在VisualStudio中下载了扩展名,并用命令指定了文件的位置。 我做了一个代码:-Python Cron作业是如何工作的?,python,visual-studio,cron,Python,Visual Studio,Cron,从最近几天开始,我一直在寻找在特定时间重新启动脚本的方法。就在那时,我被介绍认识了克朗的工作。我通过一个链接 说明如何在settings.json文件中使用cron作业。我已经在VisualStudio中下载了扩展名,并用命令指定了文件的位置。 我做了一个代码:- { "python.pythonPath": "/usr/bin/python3", "python.linting.pylintEnabled"
{
"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"
}
}
]
}
}
它不起作用我真的不知道应该做什么更改才能使它起作用。你想让visualstudio定期运行你的python脚本吗?@balderman我想每天在特定的时间重新启动特定的脚本。在这种情况下,它是DevicesWrapper.py。代码-应该在Linux还是Windows上运行?在远程raspberry pi设备上运行使用visual studio raspian.see是否希望visualstudio定期运行python脚本?@balderman我希望每天在特定时间重新启动特定脚本。在本例中,该脚本为deviceswapper.py。代码-应在Linux或Windows上运行?在使用visual studio raspian的远程raspberry pi设备上运行。see