42
submitted 1 year ago by PrivateOnions@lemmy.ml to c/linux@lemmy.ml

I am on Mint XFCE and Redshift is just so inconsistent and I have tried its forks, also inconsistent. So instead I have been using sct in the terminal to adjust the temperature, and have set a command that resets it back to normal every time that I log on. However, I was wondering if there is a way to make it so that "sct 2750" runs every day at 10 pm or during a specific period of time.

you are viewing a single comment's thread
view the rest of the comments
[-] IsoKiero@sopuli.xyz 27 points 1 year ago

Which is a lot more difficult in every aspect than just throwing a single line on crontab and calling it a day.

[-] 0xtero@kbin.social 16 points 1 year ago

a lot more difficult in every aspect

Perfect summary of systemd

[-] Dirk@lemmy.ml 8 points 1 year ago

At the same time you get a lot more benefits doing so. You also don't need to install additional software just to run a background task every X time units.

And if you need to learn something, just learn the current state if the art.

[-] Maestro@kbin.social 5 points 1 year ago

I don't know any distro that ships without cron installed out of the box. Maybe some bare bones minimal distro but I assume that OP isn't using that or he would not need to ask this question.

[-] Synthead@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

I don't agree with this statement, personally. People who aren't familiar with cron will see magic numbers and magic characters. It's also possible to have friction getting the environment set up correctly for the program being called by cron.

systemd timers use exact phrases in its configuration like "daily." You can also name the timer, start and stop the timer, view logs specifically for that timer, etc. Plus, it just calls a service file, which again is much simpler than other options like System V. You can run multiple commands in order, set an environment, use a user, jail the commands, etc.

Any of these things done "the old way" have been obscure and difficult. When was the last time you thought about a runlevel? The timer configs aren't one-liners, but it's because it's packed loads of features and it's human-readable. Plus, anything you do surrounding the cron job is also obscure, in my opinion.

Plus, cron jobs, if you choose to use them, are performed by systemd compatibility code, anyway.

this post was submitted on 13 Jul 2023
42 points (100.0% liked)

Linux

48332 readers
720 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS