You are not logged in.

#101 2015-02-12 17:10:02

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 673
Website

Re: Cronwhip - no more missed cronjobs

I'm confused on how to use cronwhip with Arch's default cron implementataion (cronie)
atm cronwhip runs missed jobs that are in crontab (users and root).
Not the jobs that I put in /etc/cron.<frequency>

kekules_dream wrote:

Is cronwhip compatible with cronie?  I have cronie installed and I just updated cronwhip to 2012.02.16.56696-14.  I modifed rc.local as recommended.  If I reboot, log in as root, and wait 5 minutes, I get:

no crontab for root

cronie installs an /etc/anacrontab.  Is there a set of instructions somewhere about setting up cronwhip?

Xyne wrote:

Cronwhip just needs a crontab in the following format:

01 * * * *  /usr/sbin/run-cron /etc/cron.hourly
02 00 * * * /usr/sbin/run-cron /etc/cron.daily
22 00 * * 0 /usr/sbin/run-cron /etc/cron.weekly
42 00 1 * * /usr/sbin/run-cron /etc/cron.monthly

If you can tell me how to extract that from cronie/anacrontab then I should be able to add an option to cronwhip.

cronie/Anacron does not provides /usr/sbin/run-cron.

EDIT:
Also customs settings in crontab like PATHs, SHELL and MAILTO are not supported. cronwhip give out on the first one it reads with:

error: failed to parse crontab entry (MAILTO="<admin@mail>")

MAILTO can be commented out and set via e.g. msmtp, but I dunno for the others.

Last edited by kozaki (2015-02-23 10:42:26)


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#102 2015-02-23 19:59:26

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: Cronwhip - no more missed cronjobs

I somehow missed the part about /etc/anacrontab. I'm looking at the file right now and I expect that it should be relatively easy to add an optional path parameter to cronwhip and update the parser to skip non-crontab lines. I'll post an update when if I do.

edit
I have added an option to read a crontab from a file or STDIN, but anacron's format is different. I don't have the time to explore the implementation details right now so someone else will have to write a pipe converter to transform anacron's format to crontab format.

Cronwhip now ignores lines that the regular expression fails to match so it will skip PATH, MAILTO and other such lines in most cases. I say "most" because the regular expression is simplistic and designed for validated crontabs.

Last edited by Xyne (2015-02-23 20:59:15)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#103 2015-03-14 15:39:19

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 673
Website

Re: Cronwhip - no more missed cronjobs

Hi, atm cronwhip parse my users' crontabs, prints it (STDOUT) and displays a warning for the "MAILTO=""" line. And that's it :}
Ready to test if you whish; just let me know.

cronie 1.4.12
cronwhip 2015.1


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#104 2015-03-14 21:28:23

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: Cronwhip - no more missed cronjobs

Well, as I stated above, it seems that anacron/cronie uses a different format, so it's not a proper crontab. It should be easy to write a parser or converter for that format, but I don't use it so I am not familiar with it.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB