The officially official Devuan Forum!

You are not logged in.

#1 2024-05-18 11:53:26

dexter
Member
Registered: 2024-05-18
Posts: 4  

[SOLVED] crontab has no effect

Hey everone,

today I've installed Devuan for the 1st time using the devuan_daedalus_5.0.1_amd64_netinstall.iso ISO. The only selected software to install was standard system utilities and for the init system I selected openrc. It's btw the first time ever using a non systemd OS.

After the initial installation I logged in as root to install some essential packages like sudo, git, curl and make. Next I've created a file in /etc/sudoers.d for my non-root-account.

Using the non-root-account I've installed all remaining packages including my prefered window manager, spectrwm, and rebooted. Finally I've created some entries in my crontab like:

*/15 * * * * /usr/bin/mw-mailsync

Sadly non of my cronjobs will take effect so I verified that the cron daemon is running via sudo rc-service cron status resulting in:

cron is running

And a pgrep cron results in:

2116

Following cron.log using sudo tail -f /var/log/cron.log confirms that my crontab entries will be executed:

2024-05-18T11:46:01.328023+02:00 hostname CRON[14006]: (my user) CMD (/usr/bin/mw-mailsync)

I'm certainly suffering from some kind of brain fart at the moment and don't see the obvious problem, which is why I'm turning to the swarm intelligence with confidence.

Thank you for your time and effort,
dexter

Offline

#2 2024-05-18 12:29:22

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,249  

Re: [SOLVED] crontab has no effect

First cabs off the rank would be:
1. Is this a PATH problem? (Non-root user typically lacks /sbin and /usr/sbin in PATH)
2. Or a problem due to that /bin/sh is dash rather than bash ?

Offline

#3 2024-05-18 12:52:21

swanson
Member
Registered: 2020-04-22
Posts: 103  

Re: [SOLVED] crontab has no effect

OT: welcome Dexter! Devuan is great and you've made a great choice!

Offline

#4 2024-05-18 14:15:34

alexkemp
Member
Registered: 2018-05-14
Posts: 338  

Re: [SOLVED] crontab has no effect

ralph.ronnquist wrote:

Is this a PATH problem? (Non-root user typically lacks /sbin and /usr/sbin in PATH)

Hmm. I've only added one entry to my $PATH. Here is the result with that extra removed (under Daedalus):

$ echo $PATH
/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Offline

#5 2024-05-18 14:19:53

dexter
Member
Registered: 2024-05-18
Posts: 4  

Re: [SOLVED] crontab has no effect

@ralph.ronnquist: Got it sorted and one of the reasons was the wrong syntax and, in the specific case of /usr/bin/mw-mailsync, the fact that a required script was missing. In most cases, the root of the problem can be found near the keyboard ;-) Thanks for the input, though.

@swanson: Thanks, now that I got my issues sorted I can enjoy my new environment.

The next tasks will be to install Daedalus on my remaining systems and dive deeper into the openrc sea.

Offline

#6 2024-05-18 20:45:04

swanson
Member
Registered: 2020-04-22
Posts: 103  

Re: [SOLVED] crontab has no effect

OT: On my Devuan machines, the problems are always at the keyboard. Don't know why...

Offline

Board footer