Perhaps this is a different solution. I created a web application that requires 5-10 clones to support it and various intervals. I want to register crontab in version control so that it can be easily deployed to other servers.
I would like to be able to put a line in the / etc / crontab file to say that it looks in the /myapp/app.crontab file and treats all the lines in this file as crontab entries ... i.e.
0 1 * * * root /bin/sh /do/something.sh
Why not just check / etc / crontab? Since when deploying from server to server, some servers may have different entries in their crontabs, which I do not want to interfere with.
Any ideas? What do other people do to store a bunch of crontab entries in rev ctrl?Thanks.
Place your crontab file in /etc/cron.d/- either in the verification file or a symbolic link to the extracted file.
We use a completely different approach to this problem in the project I'm working on.
Perl script, crontab.pl, crontab. , crontab , crontab.pl script .
crontab.pl
script . :
*/5 * * * * /usr/local/apache/crontab.pl 5 > /var/log/crontab.log 2>&1 # 5 minute interval 1 * * * * /usr/local/apache/crontab.pl 60 > /var/log/crontab.log 2>&1 # 1 hour interval 1 1 * * * /usr/local/apache/crontab.pl 3600 > /var/log/crontab.log 2>&1 # 1 day interval
, .
( ) crontab, script, :
0 * * * */path/to/app/hourly.sh 0 0 * * */path/to/app/daily.sh 0 1 * * 5/path/to/app/weekly.sh
hourly.sh , , daily.sh , , ..
, cron , crontab, , , 14 , 12 , 2,1 , script , Heisenbug.
- .
, , - crontab , script crontab , .
:
crontab filename
Or for a specific user (for this he must have access to the superuser):
crontab -u my_web_user filename
One big caveat is that it assumes that there is only one crontab entry for each user and that it is saved in SCM. If someone else edits crontab on the server, these changes will be lost during the next deployment. Therefore, keep this in mind.
Source: https://habr.com/ru/post/1702745/More articles:XPath Version Search - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1702741/reporting-services-total-and-percentages-for-each-row&usg=ALkJrhjgiPOIABOpyymHIBaLpdFy8OwlfAInsert rows (parent and child elements) programmatically - javaSimpleDB Dialog for NHibernate - amazonMDX: Фильтрация члена, заданного значениями таблицы мер - filterNHibernate - Join Without Matching - referenceMigrating an application from Oracle 9 to Oracle 11 - gottchas? - oraclemap limit key and value types - harder - javaPossible minus if the operator (? :) in C #? - c #What happened to my soft shadow code? - c #All Articles