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.
Edit: I figured out the solution which was to create a crontab with the following line in it: 0 22 * * * env DISPLAY=:0 XAUTHORITY=$HOME/.Xauthority /usr/bin/sct 2750
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.