You are not logged in.

#1 2015-01-16 16:33:00

vibee
Member
Registered: 2013-06-15
Posts: 38

[solved] Scripts in cron.daily not started

Hi,

I successfully run some jobs using crontab without problem (so cronie service itself runs fine).

However, I need to run some jobs with anacron on a daily basis. I copied those shell scripts to /etc/cron.daily, set ownership to root:root and rights to 744.

[root@arch-desktop /]# ls -la /etc/cron.daily/
total 12
drwxr-xr-x   2 root root 4096 Jan 12 07:48 .
drwxr-xr-x 100 root root 4096 Jan 16 00:08 ..
-rwxr--r--   1 root root  758 Jan 12 07:13 backup_local.sh

Unfortunately, it seems like the script is not being executed, when cron.daily is scheduled. All I found to trace the issue is the entry in journal:

Jan 16 15:23:01 arch-desktop anacron[3028]: Job `cron.daily' started
Jan 16 15:23:01 arch-desktop anacron[3028]: Job `cron.daily' terminated
[root@arch-desktop /]# ls -la /etc/cron.d/
total 12
drwxr-xr-x   2 root root 4096 Nov 28 08:39 .
drwxr-xr-x 100 root root 4096 Jan 16 00:08 ..
-rw-r--r--   1 root root  128 Apr 13  2014 0hourly
[root@arch-desktop etc]# cat cron.d/0hourly 
# Run the hourly jobs
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
01 * * * * root run-parts /etc/cron.hourly

Any idea what I could have forgotten? On another arch machine, I am facing exactly the same issue. Maybe I need to add a 0daily file, similar to 0hourly, to /etc/cron.d/?

Last edited by vibee (2015-01-16 23:00:19)

Offline

#2 2015-01-16 17:19:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] Scripts in cron.daily not started

Use a filename w/o '.' dot, see https://wiki.archlinux.org/index.php/Cr … arts_issue

Edit: Use run-parts to test if the filename is OK: http://manned.org/run-parts/516894fa

Last edited by karol (2015-01-16 17:28:32)

Offline

#3 2015-01-16 22:59:58

vibee
Member
Registered: 2013-06-15
Posts: 38

Re: [solved] Scripts in cron.daily not started

Thank you, that did the trick. It might be a good idea to note this in the wiki.

Offline

#4 2015-01-17 16:53:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] Scripts in cron.daily not started

vibee wrote:

It might be a good idea to note this in the wiki.

It already is in the wiki.

Offline

#5 2015-01-18 14:33:39

vibee
Member
Registered: 2013-06-15
Posts: 38

Re: [solved] Scripts in cron.daily not started

karol wrote:
vibee wrote:

It might be a good idea to note this in the wiki.

It already is in the wiki.

Thanks for adding the links in your previous posts. I was only reading this section:  https://wiki.archlinux.org/index.php/Cron#Anacron .

Offline

Board footer

Powered by FluxBB