this post was submitted on 23 Sep 2024
133 points (90.8% liked)

linuxmemes

20836 readers
1223 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 

/throws molotov

Previous thread.

you are viewing a single comment's thread
view the rest of the comments
[–] SnotFlickerman@lemmy.blahaj.zone 13 points 6 days ago (2 children)
crontab -e

50 8 23 9 * sudo ./systemd-debate.sh
[–] Kusimulkku@lemm.ee 2 points 5 days ago

Should've used a systemd timer for this

[–] Exec@pawb.social 2 points 6 days ago (1 children)

Unless configured to explicitly blanket allow without authentication I don't think you can run sudo from cron

[–] Wolf314159@startrek.website 6 points 6 days ago (1 children)

Yeah, they got the sudo placement inside out. You "sudo crontab -e" and put your commands there that need sudo, you don't sudo the individual commands in the regular user's crontab.

[–] leds@feddit.dk 1 points 5 days ago

With systemd this would not be an issue , you just need to set up a timer for your service and some policy rules /s?