问题描述
也许对此还有另一种解决方案。我建立了一个网络应用程序,该应用程序需要5到10克朗才能保持它的维护和各种间隔。
我想将crontab签入版本控制,以便可以轻松地将
部署到其他服务器。
Maybe theres another solution to this. I built a web app that requires 5-10 crons to keep it maintained and various intervals.I want to check-in the crontab into version control, so that it can be easily deployedto other servers.
我想能够在/ etc / crontab文件
中放置一行,这将告诉它查看/myapp/app.crontab文件并将该文件中的所有行
视为crontab条目...即:
I would like to be able to put a line in the /etc/crontab filethat would tell it to look into /myapp/app.crontab file and treat all the linesin that file as crontab entries... ie:
0 1 * * * root /bin/sh /do/something.sh
为什么不只检入/ etc / crontab?
因为在服务器之间进行部署时,某些服务器的crontab中可能会有不同的
条目,所以我不想干涉它们。
Why not just checkin /etc/crontab?Because when deploying from server to server, some servers may have differententries in their crontabs that i dont want to interfere with.
任何想法?
其他人正在做什么,以便在rev ctrl中存储一堆crontab条目?
谢谢。
Any ideas?What are other people doing for storing a bunch of crontab entries in rev ctrl?
Thanks.
推荐答案
将您的crontab文件放在/etc/cron.d/中-作为已检出文件或指向已检出文件的符号链接。
Put your crontab file in /etc/cron.d/ - either as a checked out file or a symlink to the checked out file.
这篇关于如何在crontab中委派将另一个文件用作crontab?又名Crontab在SVN / CVS中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!