260
submitted 2 years ago* (last edited 2 years ago) by bleistift2@sopuli.xyz to c/programmer_humor@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] SnotFlickerman@lemmy.blahaj.zone 35 points 2 years ago* (last edited 2 years ago)

When all else fails...

crontab -e

@reboot sleep 300 && sudo ./myshell.sh

(this is actually broken on some distros)

[-] Scoopta@programming.dev 21 points 2 years ago

I've been in the systemd world so long none of my systems even have cron

[-] GravitySpoiled@lemmy.ml 25 points 2 years ago

That sounds like a sad world. I like cron

[-] Scoopta@programming.dev 2 points 2 years ago

LOL, I actually like systemd timers, cron seems easier to setup quickly but I do like some of the features of timers combined with services.

[-] xmunk@sh.itjust.works 1 points 2 years ago

Reject systemd embrace bashrc.

[-] marcos@lemmy.world 4 points 2 years ago

Though, not every cron supports that.

Also, if you are packaging software, you have to do it the right way. But if not, it's often easier to go and install an init script.

[-] SnotFlickerman@lemmy.blahaj.zone 3 points 2 years ago

I actually edited my comment right as you were responding. It's definitely broken in some distros, I think debian/ubuntu.

[-] marcos@lemmy.world 3 points 2 years ago

It's not broken. You just have to get a cron that supports it. Debian has at least one that does, but it's not the default one.

[-] bleistift2@sopuli.xyz 3 points 2 years ago

Thanks. man 5 crontab says the @reboot syntax is supported, so I’ll give that a try if I don’t stumble upon a different solution.

[-] bleistift2@sopuli.xyz 3 points 2 years ago
[-] SnotFlickerman@lemmy.blahaj.zone 13 points 2 years ago* (last edited 2 years ago)

Just to make sure it pops off after fully starting up. I run a lot of old hardware, so it's useful for me. You may not need a delay.

this post was submitted on 24 Dec 2024
260 points (96.1% liked)

Programmer Humor

33083 readers
2047 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS