Error when using crontab in new template from Debian-12-xfce

systemctl status cron
○ cron.service - Regular background program processing daemon
     Loaded: loaded (/lib/systemd/system/cron.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/cron.service.d
             └─30_qubes.conf
     Active: inactive (dead)
  Condition: start condition failed at Thu 2025-03-27 19:14:00 PDT; 2min 3s ago
             └─ ConditionPathExists=/var/run/qubes-service/crond was not met
       Docs: man:cron(8)

The output indicates that the cron service is currently inactive (dead) and that it failed to start because the condition for its operation was not met. Specifically, it mentions that the condition ConditionPathExists=/var/run/qubes-service/crond was not met. This suggests that the cron service is not set up to run in your Qube environment.

Understanding the Issue

In Qubes OS, certain services, including cron, may not be enabled or configured to run in App Qubes by default. The ConditionPathExists check indicates that the service is looking for a specific file that is not present, which is likely due to the way Qubes OS manages services in App Qubes.

I don’t understand this or why I can’t just have cron run stuff like normal.

I don’t understand why cron’s activation depends on that path, if it doesn’t actually exist. Could this be a bug? Or something that can’t always be applied?

I’m using cron on a standalone VM running Debian 12 and was having this problem. To solve this issue, I edited the /usr/lib/systemd/system/cron.service.d/30_qubes.conf file, commenting out the second line it contains and adding another one with an existing path. The contents of my file were as follows:

[Unit]
#ConditionPathExists=/var/run/qubes-service/crond
ConditionPathExists=/etc/default/cron

And after save the file and reboot the VM, cron seems to work.

You need to add the service “crond” in the qubes settings, “services” tab

1 Like

Obviously, your solution is the correct one. Mine was just a workaround to get by.

I enabled the service as you explained, and the crond file appeared in /var/run/qubes-service. I then restored the 30_qubes.conf file to its original state, and cron works as expected.

Thanks.

1 Like