I want to set up crontab every minute on Manjaro, so I've put some script every minute with:

$ crontab -e
* * * * * /path/to/my/script.sh
crontab: installing new crontab

Then I see it is installed

$ crontab -l

but I see it is not working, so I try to restart:

$ sudo systemctl restart crontab 
Failed to restart crontab.service: Unit crontab.service not found.

$ sudo systemctl restart cron.service
Failed to restart cron.service: Unit cron.service not found.

$ sudo systemctl list-unit-files | grep -i cron    # No output

Then I've noticed that no file cron.service was found on my computer, so I've found cron.service on different computer (with Mint):

$ cat /lib/systemd/system/cron.service
Description=Regular background program processing daemon

ExecStart=/usr/sbin/cron -f $EXTRA_OPTS


So maybe I can copy those files with all dependencies from the computer:

scp mint:/lib/systemd/system/cron.service /lib/systemd/system/
scp mint:/etc/default/cron /etc/default/
scp mint:/usr/sbin/cron /usr/sbin/

but I'm not sure if it is good solution?

I know that there are alternatives, especially dedicated timers for Arch distributions, but I prefer portable between systems solution. Is it possible to use normally cron on Manjaro 19.02?

  • @roaima: I've answered You after the "edit" section in my euestion – baziorek Mar 21 at 17:59
  • I don't know why you have a cron client but no daemon. Isn't cronie the standard one for Arch and Manjaro - should you install that? – roaima Mar 21 at 18:02
  • @roaima: Maybe it is because it is adition for RaspberryPi 4. Probably Manjaro made this different than normal distributions. – baziorek Mar 21 at 19:52

I've found solution on Manjaro's polish forum: instead cron we should install cronie:

sudo pacman -S cronie
sudo systemctl enable cronie.service
sudo syctemctl start cronie.service

Then we can configure like normal crontab.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.