- In this video,
I want to give you an overview of task scheduling options.
It all starts with cron.
cron is a classical solution.
It allows you to schedule reoccurring tasks.
cron uses the crond daemon,
and you can use crontab -e to edit tasks.
And this is what you wanna do if you wanna make sure
that the specific task is happening every hour, day
or whatever, on a regular basis.
There's also at.
at, or at is to learn tasks once at a specific moment.
It uses the atd daemon, and you use the at command
to schedule the tasks.
The third way is the systemd timer.
As you know, systemd is taking over a lot of
functionality that previously was done by other solutions.
And the systemd timer is the newer alternative to cron.
It works by creating a .timer unit,
and you run this timer unit using systemctl.
So what do you remember about this, when to use what?
Well, I would advise, as a generic solution go for cron.
It's old it's proved and everybody is using it.
So there's nothing wrong with it.
systemd timers, you need to be aware of them
because as systemd is becoming more and more important
you will see an increasing amount of systemd timers,
and you will also see that chron jobs are being replaced
by systemd timer jobs,
especially in the operating system itself.
at, is not that important.
at is important for users that want to run a task
at a specific moment, and once only.
But most of the cases you'll be dealing with cron anyway.