[SOLVED]Cronjob not working in Workstation

On a Qubes 3.1 in the standard anon-whonix Workstation I had difficulties getting cronjob working. After a restart attemp with sudo /etc/init.d/cron start that indicated a succesfull start of cron, however sudo service --status-all indicated that cron was not running.

Not sure if this problem is a qubes-whonix specifc problem or all Whonix versions. If more info is needed for solving this problem, feel free to ask! How could cron/cronjob be activated when sudo /etc/init.d/cron start seems to be ignored?

dom0 terminal:

qvm-shutdown anon-whonix
qvm-service -e anon-whonix crond
qvm-start anon-whonix

https://www.qubes-os.org/doc/dom0-tools/qvm-service/

Thank you, this solves the problem. Was not aware that cron/crond was a qvm-service, so expected it would be a whonix related issue.

It would be good to understand why crond is disabled by Qubes default.

Possible answer in these discussions:

1 Like

Currently only using cron/cron in a Standalone VM, so I do not have the problem of resetting /var/spool that would be the case with AppVMs.

The two links both mention another job scheduler, anacron. Would another job scheduler be prefered over cron, especially security wise?

I don’t think cron vs anacron is related to security. Just look up which different problems these different projects solve.

The earliest code can be found here.
vm(+dom0): major rearrage VM files in repo; merge core-*vm packages · QubesOS/qubes-core-agent-linux@240d352 · GitHub
vm(+dom0): major rearrage VM files in repo; merge core-*vm packages · QubesOS/qubes-core-agent-linux@240d352 · GitHub

I think it’s not related to security too. just “unnecessary services…”.
As Marek said, it’s about “performance”.

Qubes is based on Fedora, and anacron is the only offered cron. Unlike Debian, Fedora don’t have choice for cron daemon.