On Thu, 4 Mar 2010 10:21:27 -0500 Matt Richards <defraya...@gmail.com> wrote:
MR> On Mar 4, 2010, at 10:12 AM, Ted Zlatanov wrote: >> On Thu, 04 Mar 2010 16:05:04 +0100 Mark Burgess <mark.burg...@iu.hio.no> >> wrote: >> MB> I always did a HUP, but I don't have to deal with AIX. From 3.0.4 MB> cfengine will detach from its parent, so it could kill and restart MB> cron. >> >> The other common method besides HUP is to just resubmit the crontab with >> "crontab FILENAME", naming a specific user if necessary. MR> True, only if you have the full crontab available as a file. With MR> cfengine, I just edit the cron entry directly without pulling the MR> whole file. But, that is another way to do it. I suppose you could MR> do a crontab /var/spool/cron/crontabs/<username> Yes :) MR> Interesting, I never thought to do it that way. It might be more MR> consistent across platforms than creating different methods for MR> SIGKILL, SIGHUP, restart. Yes, that was my motivation too. Signals also caused problems with fcron on Solaris 2.6 for me so that was another reason to avoid them. Incidentally, this is how cfperl did it, by calling crontab. Sadly I haven't had the time to work on cfperl and cfengine has moved on, but you can find the source code at http://savannah.nongnu.org/projects/cfperl with some examples and a manual. This was cfperl's cfengine-ish language to edit crontabs, from the example configuration file: cron: any:: delete cron cftest delete full cron cftest hourly at 0,10,20,30,40,50 do as cftest /usr/bin/synchronize hourly at * do as cftest /usr/bin/synchronize hourly at 0-59 do as cftest /usr/bin/synchronize daily at 4,5,6 do as cftest /usr/bin/checknetwork daily at 4:30 do as cftest /usr/bin/checknetwork daily at 4,5:30 do as cftest /usr/bin/checknetwork daily at 4,5:30,6:30,7,9:30,4:01,7:01,10:02 do as cftest /usr/bin/checknetwork daily at 1 do as cftest /usr/bin/checknetwork weekly on Monday,Tuesday at 2; on Tuesday,Friday at 8,3; on Thursday at 20,22 do as cftest /usr/bin/checkquotas weekly on Monday,Sunday at 2:40; on Tuesday at 8:10,9:10; on Thursday at 20 do as cftest /usr/bin/checkquotas monthly on 1 at 2:30 do as cftest /usr/bin/checkquotas monthly on 1,2 at 2:10,3:40 do as cftest /usr/bin/checkquotas monthly on 1 at 2; on 4,8 at 4; on 31 at 8 do as cftest /usr/bin/checkquotas yearly in January on 1 at 2; in March on 4,5 at 8:30; in November,December on 28,30 at 20:01,21 do as cftest /usr/bin/checkquotas >From that it would create or edit a crontab with lines as specified. I hope this is of historical interest :) Ted _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine