Date: Wed, 06 Nov 2013 22:53:46 -0500 From: Allan Jude <freebsd@allanjude.com> To: Kimmo Paasiala <kpaasial@gmail.com> Cc: FreeBSD current <freebsd-current@freebsd.org> Subject: Re: cron(8) improvement Message-ID: <527B0ECA.2000309@allanjude.com> In-Reply-To: <CA%2B7WWSdFFk4npy0=TOWO=6RApv5-wuJASHhE87eUf52DjQrxjw@mail.gmail.com> References: <52792B60.1030309@allanjude.com> <488180AE-5C23-402A-BAA4-E3263D8C52BF@kientzle.com> <1383788977.14448.44112617.6F0D61A0@webmail.messagingengine.com> <527AFAA1.1040001@allanjude.com> <CA%2B7WWSdFFk4npy0=TOWO=6RApv5-wuJASHhE87eUf52DjQrxjw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --QV0UuXEJAXCCSNTAuwVEIPdGrMETWInno Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2013-11-06 22:49, Kimmo Paasiala wrote: > On Thu, Nov 7, 2013 at 4:27 AM, Allan Jude <freebsd@allanjude.com> wrot= e: >> On 2013-11-06 20:49, Mark Felder wrote: >>> On Wed, Nov 6, 2013, at 18:21, Tim Kientzle wrote: >>>> On Nov 5, 2013, at 9:31 AM, Allan Jude <freebsd@allanjude.com> wrote= : >>>> >>>>> This came up in discussion on IRC and I thought I should throw it a= t the >>>>> list so I don't forget. >>>>> >>>>> A user was asking how to do what linux cron does, where there is a >>>>> directory /etc/cron.d/ that packages and add files to to create cro= ntabs. >>>>> >>>>> Making FreeBSD's cron (Vixie Cron) include /etc/cron.d/ and >>>>> /usr/local/etc/cron.d/ in the /etc/crontab format seems like a very= >>>>> useful feature, especially for pkg(8) as it makes it easy and safe = to >>>>> programatically add and remove crontabs as part of a package. >>>> This is a good idea. We should do it. >>>> >>>> How and if this facility gets used is a separate question. >>>> >>>> "Tools, not policy." >>>> >>>> Support for a cron.d directory is a tool that can be >>>> used in many ways. The policy of how it should be >>>> used is a separate discussion. (For example, whether >>>> or not ports or packages should install crontab files into >>>> /usr/local/etc/cron.d/ can be richly debated after that >>>> directory exists.) >>>> >>> Ok, so we create that directory. Now nobody can use it in a port unti= l >>> FreeBSD 8.4 is EoL -- approximately June 30, 2015. >>> >>> We should be using the existing cron tabs directory *now*. We can't >>> easily force older versions of FreeBSD to update their cron software = or >>> configuration to support that new directory. >>> >>> I'm not saying we shouldn't create it, just that we can't effectively= >>> use it for 2 years. >>> _______________________________________________ >>> freebsd-current@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-current >>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd= =2Eorg" >> My use case is less about packages, and more about puppet, ansible etc= =2E >> Puppet relies on these hideously large markers in the crontab files to= >> programmatically add/remove crons, whereas a cron.d directory could be= >> done nice and clean >> >> And in that case, the fact that it is not supported on 8.x does not >> bother me. >> >> -- >> Allan Jude >> >> > What's wrong with using the existing tools for achieving the same > effect? Periodic can be adapted to do exactly what you're describing > as noted above by adding an hourly (even minutely? :D ) periodic run. > Also periodic already has support for ports installing their own jobs > under /usr/local/etc/periodic.d that can be enabled/disabled in > periodic.conf. > > -Kimmo Programmatically installing a cron that runs at odd intervals (our use case, on minutes 9,24,39,54 of each hour, manually staggered across groups of hosts). To enable a new periodic run, you have to edit the /etc/crontab file. I could add my cronjobs there directly, or via the crontab command (how puppet does it now), but i'd rather drop files in a directory, so they can be more easily removed or updated. =46rom a management perspective, when dealing with 100s of machines, it i= s just a much nicer way to do it. --=20 Allan Jude --QV0UuXEJAXCCSNTAuwVEIPdGrMETWInno Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSew7KAAoJEJrBFpNRJZKfs4EP+gJ0gbsp3DjU9WqUUSAddiC+ Wc/UDg6K2QIRO2n+qiSeCPfoqzp+VGgjq4O3o/4WYvRXHxHm2scX59z1fOg1YCCH B3W1ltq6Vdgj67sfoNNlDX/POzXcomI1buXhzNohSCbroBkfMM4qSkuafzBd9EbS mNjDJJ9w7nEZEzf3ruYO2EIxyFchOqDq4KUNWzajg80Nk7QjPqlRhO34YFyoQB2l R8NQz/CFomOXMj3zCry4Ss9lB3Qs0S8hdGelXpy287rIQz6LCu/eBCqlr3dAEoum /swnWRd78D1xpg81FoLSzYXFANcy57FuKSs4xo7qa8TCM6qiYNu7FZyJtJsYfu37 /CxcmGqcXYykbzFx+hcdjL4pqhAvNcJwMD+qLuJW56Sg2jXuztb95JlfkF/iKT99 ETa73haUA1DUR1I/UGOn0VJHzqoM5F1zuu8HrdgnPcnMKx+DHELoOVQdsARSLFFB AOohdvEPScx1o1mZCQjojEbn2QRBOh11pi3ac+bXS4AbldoVF+wra1IRlQYu8xJb Gm3gnTaTPuJ3gJHiR2iuGhkC8bcAnXSQ7RZYvXuQNXIryiag8j10t4pCCwLrA+1v XfQ7xVR3HaQsu2tO23vll99ckrH4TrJyz5cxRkn3+hqNYNWgm7M8VY1UcoNGVhyj y5zQq9ehnfQi144lDUDl =wGqd -----END PGP SIGNATURE----- --QV0UuXEJAXCCSNTAuwVEIPdGrMETWInno--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?527B0ECA.2000309>