# \#cron

**URL:** https://discussion.fedoraproject.org/tag/cron/489.md

[Latest](https://discussion.fedoraproject.org/latest.md) · [Categories](https://discussion.fedoraproject.org/categories.md) · [Tags](https://discussion.fedoraproject.org/tags.md)

---

## [Cron not working for root](https://discussion.fedoraproject.org/t/cron-not-working-for-root/199886)

<div class="topic-metadata">

**Author:** [@bearsard](https://discussion.fedoraproject.org/u/bearsard)\
**Replies:** 18\
**Last updated:** [August 21, 2026, 6:15pm UTC](https://discussion.fedoraproject.org/t/cron-not-working-for-root/199886 "2026-08-21T18:15:00Z")

</div>

Hello, I am on Fedora KDE 43, and I am pretty new to Linux, so I shouldn’t have derived too much from the original setup. I am trying to make my computer hibernate between 9PM and 7AM, if it is not already closed. I want to make the following cron line work: \* 0-6,21-23 \* \* \* systemctl hibernate…

---

## [Cron Tasks Not Running When I'm Away](https://discussion.fedoraproject.org/t/cron-tasks-not-running-when-im-away/181498)

<div class="topic-metadata">

**Author:** [@hedgehog-eagle](https://discussion.fedoraproject.org/u/hedgehog-eagle)\
**Replies:** 4\
**Last updated:** [February 19, 2026, 12:23am UTC](https://discussion.fedoraproject.org/t/cron-tasks-not-running-when-im-away/181498 "2026-02-19T00:23:46Z")

</div>

Hello! I have a very simple bash script that I have scheduled to run weekdaily. I tried crontab -e with 0 19 \* \* 1-5 bash /path/to/script.sh and I also tried sudo crontab -e with the same task. Neither work if I’m not actively working at my computer at the same time. I would appreciate any guidance …

---

## [Setting wallpaper from cron/systemd in X11 and Wayland…](https://discussion.fedoraproject.org/t/setting-wallpaper-from-cron-systemd-in-x11-and-wayland/157548)

<div class="topic-metadata">

**Author:** [@kierun](https://discussion.fedoraproject.org/u/kierun)\
**Replies:** 5\
**Last updated:** [July 7, 2025, 11:05am UTC](https://discussion.fedoraproject.org/t/setting-wallpaper-from-cron-systemd-in-x11-and-wayland/157548 "2025-07-07T11:05:38Z")

</div>

I have a bash script (see below) that sets the wallpaper on X11/Waland. This script works fine from the command line. However, running it from cron gets me the error: I need either X11 or Wayland, got XDG\_SESSION\_TYPE="unspecified". WOT? How do I make it detect that the main user is logged in on …

---

## [Cron support \[systemd-crontab-generator\]](https://discussion.fedoraproject.org/t/cron-support-systemd-crontab-generator/146545)

<div class="topic-metadata">

**Author:** [@pramodvu1502](https://discussion.fedoraproject.org/u/pramodvu1502)\
**Replies:** 18\
**Last updated:** [March 5, 2025, 4:28pm UTC](https://discussion.fedoraproject.org/t/cron-support-systemd-crontab-generator/146545 "2025-03-05T16:28:49Z")

</div>

Yes, systemd has timers. They work well. But there are still quite a few packages which support cron, and their systemd.timer support is wonky at best. Also, a single line in crontab, a single script in cron.daily etc… is mucheasier than 2 unit files \[systemd.timer, systemd.service\] with a few lin…

---

## [Fedora 40 crontab selinux](https://discussion.fedoraproject.org/t/fedora-40-crontab-selinux/126544)

<div class="topic-metadata">

**Author:** [@over60](https://discussion.fedoraproject.org/u/over60)\
**Replies:** 1\
**Last updated:** [July 22, 2024, 8:43am UTC](https://discussion.fedoraproject.org/t/fedora-40-crontab-selinux/126544 "2024-07-22T08:43:24Z")

</div>

No idea how to stop the massice bold text, bewildered. Similar to 1547368 – Unable to run cron jobs from /etc/crontab due to selinux It appears to show this behaviour after I adjust /etc/crontab or a crojob is run reload being the culprit from what I can see. systemctl status crond crond.servic…

---

## [Cant execute expect script with cron job, but works in terminal](https://discussion.fedoraproject.org/t/cant-execute-expect-script-with-cron-job-but-works-in-terminal/100238)

<div class="topic-metadata">

**Author:** [@ottousualconsumer](https://discussion.fedoraproject.org/u/ottousualconsumer)\
**Replies:** 2\
**Last updated:** [December 25, 2023, 11:23pm UTC](https://discussion.fedoraproject.org/t/cant-execute-expect-script-with-cron-job-but-works-in-terminal/100238 "2023-12-25T23:23:53Z")

</div>

Hi there, I know some people asked a similar question, but I got no answer to solve my problem. I’m trying to auto-backup my bitwarden vault with a shell script I found. to type the user input automatically, I use a “expect” script. its working fine if I execute the expect script via terminal, b…

---

## [Cronjobs not executing for user (f37)](https://discussion.fedoraproject.org/t/cronjobs-not-executing-for-user-f37/82928)

<div class="topic-metadata">

**Author:** [@netdogg](https://discussion.fedoraproject.org/u/netdogg)\
**Replies:** 11\
**Last updated:** [May 24, 2023, 3:01pm UTC](https://discussion.fedoraproject.org/t/cronjobs-not-executing-for-user-f37/82928 "2023-05-24T15:01:39Z")

</div>

For some reason a cronjob-- the first and only for any regular user on this system-- is not being executed. crond is running, ascertained by “ps -ef” and “systemctr status crond.service” /etc/cron.deny is empty Put the username into /etc/cron.allow and did “systemctl restart crond.service” Ran t…

---

## [Systemd configuration: timers, targets, and serial (template) units](https://discussion.fedoraproject.org/t/systemd-configuration-timers-targets-and-serial-template-units/54495)

<div class="topic-metadata">

**Author:** [@ferdnyc](https://discussion.fedoraproject.org/u/ferdnyc)\
**Replies:** 0\
**Last updated:** [January 1, 2023, 3:27am UTC](https://discussion.fedoraproject.org/t/systemd-configuration-timers-targets-and-serial-template-units/54495 "2023-01-01T03:27:21Z")

</div>

My question was partly asked in Can systemd services be associated with more than one timer and vice versa? by @habono and answered by @kpfleming, but I’d like to delve a bit deeper into the topic. Say I have a bunch of service units. (Instances of the same template service, in point of fact. I don…

---

## [\[F36\] Cron jobs not executing with root user, OS installed as root disabled](https://discussion.fedoraproject.org/t/f36-cron-jobs-not-executing-with-root-user-os-installed-as-root-disabled/72412)

<div class="topic-metadata">

**Author:** [@asgr71](https://discussion.fedoraproject.org/u/asgr71)\
**Replies:** 9\
**Last updated:** [November 19, 2022, 3:38am UTC](https://discussion.fedoraproject.org/t/f36-cron-jobs-not-executing-with-root-user-os-installed-as-root-disabled/72412 "2022-11-19T03:38:52Z")

</div>

Hey Guys, After installing F36 as root disabled, I’m getting the following error in the log files when trying to run cron jobs as root: crond: (root) PAM ERROR (User account has expired) crond: (root) FAILED to authorize user with PAM (User account has expired) Is their a quick fix? Read about /…

---

## [Cron configuration files and directories](https://discussion.fedoraproject.org/t/cron-configuration-files-and-directories/73042)

<div class="topic-metadata">

**Author:** [@habono](https://discussion.fedoraproject.org/u/habono)\
**Replies:** 8\
**Last updated:** [October 1, 2022, 2:44pm UTC](https://discussion.fedoraproject.org/t/cron-configuration-files-and-directories/73042 "2022-10-01T14:44:09Z")

</div>

There is plethora of information regarding the editing of user crontabs: that it should be done through crontab -u or -e. But I could not find the corresponding instructions regarding the system crontab under /etc. How is it supposed to be edited? Also, there are /etc/cron.\[daily|hourly|monthly|wee…

---

## [Legit command doesn't work in crontab](https://discussion.fedoraproject.org/t/legit-command-doesnt-work-in-crontab/73332)

<div class="topic-metadata">

**Author:** [@malarkos](https://discussion.fedoraproject.org/u/malarkos)\
**Replies:** 12\
**Last updated:** [August 22, 2022, 6:09pm UTC](https://discussion.fedoraproject.org/t/legit-command-doesnt-work-in-crontab/73332 "2022-08-22T18:09:54Z")

</div>

i need to run an xinput something something command on startup. the command itself works. when i create the crontab file (as @reboot xinput or @reboot root xinput set-blah-bla and alot of numbers) it says “installing crontab”, so i assume that everything is fine. however, on startup the command doe…
