是否可以在远程服务器上使用 运行 python-crontab?
Is it possible to run python-crontab on a remote server?
我已经阅读了所有文档,似乎找不到使用 python-crontab 来 运行 远程服务器上的 cronjob 的答案或示例。这可能吗?
Link 到图书馆:https://github.com/doctormo/python-crontab
谢谢
我建议查看用于处理远程服务器的优秀 fabric 库。
fabtools 库为 fabric http://fabtools.readthedocs.io/en/0.19.0/ 提供了一些 cron 功能。这是该页面的示例
from fabtools.cron import add_task
# Run every month
add_task('cleanup', '@monthly', 'alice', '/home/alice/bin/cleanup.sh')
# Run every tuesday and friday at 5:30am
add_task('reindex', '30 5 * * 2,4', 'bob', '/home/bob/bin/reindex.sh')
我已经阅读了所有文档,似乎找不到使用 python-crontab 来 运行 远程服务器上的 cronjob 的答案或示例。这可能吗?
Link 到图书馆:https://github.com/doctormo/python-crontab
谢谢
我建议查看用于处理远程服务器的优秀 fabric 库。
fabtools 库为 fabric http://fabtools.readthedocs.io/en/0.19.0/ 提供了一些 cron 功能。这是该页面的示例
from fabtools.cron import add_task
# Run every month
add_task('cleanup', '@monthly', 'alice', '/home/alice/bin/cleanup.sh')
# Run every tuesday and friday at 5:30am
add_task('reindex', '30 5 * * 2,4', 'bob', '/home/bob/bin/reindex.sh')