You are not logged in.

#1 2013-02-15 12:19:05

peewster
Member
From: Netherlands
Registered: 2011-07-18
Posts: 47

cronie issue

Hi all,

i'm trying to get cronie to work with systemd.

crontab file (/etc/crontab):

# Default crontab file
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

# Minute, Hour, Day of month, month, Day of week 
*/1 * * * *  /usr/bin/echo "testing cron" >> /home/peewster/testing_cron

restarted cron:

systemctl restart cronie.service

Nothing shows up in the syslog.log

This is the crond.log:

Feb 15 14:01:01 b4d8oX CROND[769]: (root) CMD (run-parts /etc/cron.hourly)
Feb 15 14:01:01 b4d8oX anacron[774]: Anacron started on 2013-02-15
Feb 15 14:01:01 b4d8oX anacron[774]: Will run job `cron.daily' in 21 min.
Feb 15 14:01:01 b4d8oX anacron[774]: Will run job `cron.weekly' in 41 min.
Feb 15 14:01:01 b4d8oX anacron[774]: Will run job `cron.monthly' in 61 min.
Feb 15 14:01:01 b4d8oX anacron[774]: Jobs will be executed sequentially
Feb 15 14:05:49 b4d8oX crond[797]: (CRON) INFO (Syslog will be used instead of sendmail.)
Feb 15 14:05:49 b4d8oX crond[797]: (CRON) INFO (running with inotify support)
Feb 15 14:05:49 b4d8oX crond[797]: (CRON) INFO (@reboot jobs will be run at computer's startup.)

So my question is, why is the /etc/crontab not used ?

Last edited by peewster (2013-02-15 12:23:17)


PoC || GTFO

Offline

#2 2013-02-15 14:23:37

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: cronie issue

peewster wrote:

i'm trying to get cronie to work with systemd.
[...]
So my question is, why is the /etc/crontab not used ?

Well, at least the cronie installation I use (from the official repos) does not make use of a file /etc/crontab. If you've installed cronie via the official repos I suggest to edit the crontab file via the crontab command -- see manpage and wiki.

Last edited by ball (2013-02-15 17:49:56)

Offline

#3 2013-04-12 19:49:51

mali2297
Member
From: Sweden
Registered: 2012-10-24
Posts: 6

Re: cronie issue

I can confirm that /etc/crontab is not read. Moving the crontab file to the directory /etc/cron.d solved the problem.

However, I wonder why the first approach did not work. Is it a bug or a deliberate change? The man page still says that /etc/crontab is checked.

Offline

#4 2013-04-13 02:54:44

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: cronie issue

In cronie's ./configure:

--with-syscrontab       Build cronie with syscrontab enabled.

Offline

#5 2013-06-13 15:19:11

fwolf
Member
Registered: 2012-11-18
Posts: 3

Re: cronie issue

Got same problem and spend me hours to solve.

Suggestion cronie compile with --with-syscrontab, or leave an empty /etc/crontab with warning message .

Offline

Board footer

Powered by FluxBB