this post was submitted on 31 May 2026
96 points (88.1% liked)

Technology

85108 readers
4122 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] JTskulk@lemmy.world 2 points 2 days ago (1 children)

I'm not the OP, but I can explain how to use cron in like 4 sentences: Edit cron with the command crontab -e, this opens your text editor. If you want your jobs to have environment variables, put those at the top. Put this header at the top: # m h dom mon dow command It means minute, hour, day of month, month, day of week, command. Type in numbers for these values or a star which means all of them. Command is the command to be run.

[–] esc@piefed.social 1 points 1 day ago (1 children)

You can explain timers the same way.

And then with your explanation it goes: cron job doesn't execute for reason, crontab -l lists not all jobs, someone else put cron job in whatever directory like cron.daily, you've added or removed empty line at the end and now nothing works, debian crond and redhat cronie ahave different quirks, etc., etc.

I've dealt with insane cron problems for so long that switching to timers was like *whoa i don't need to suffer?*

[–] JTskulk@lemmy.world 2 points 1 day ago (1 children)

Maybe I'm just lucky that I haven't run into insane cron problems :) I've done both, I guess I just need to do more systemd timers and get used to it. I found it so confusing and weird to set up.

[–] esc@piefed.social 1 points 1 day ago

I've always had either problems with schedules or problems with environment because it has it's own. Cron is fine as long as you are lucky. That isn't to say there never were problems with timers, on debian 9, I think, shipped version of systemd had a bug where systemd-analyze parsed schedule correctly and timer just shit itself. But only for some specific case I can't remeber which, but it was extremely frustrating to debug.