As noted here, a cron daemon is not installed by default on Amazon Linux 2023.
Use cronie:
sudo yum install -y cronieMake the service start on boot:
sudo systemctl enable crond.serviceBut also, don’t forget to start the service:
sudo /bin/systemctl start crond.serviceCheck that the daemon is running:
ps -ef | grep cron | grep -v grepYou should see something like this:
/usr/sbin/crond -nAfter this, you can use the usual crontab command.
It’s worth noting that as described in this thread, the lack of a cron scheduler is deliberate:
It’s one of the components we have decided not to include in the AMIs in AL2023 as the same (in fact, better) functionality is provided by systemd.
If you want to use a systemd timer you can start with these resources:
For now, I am migrating some old cron jobs from an Amazon Linux 2 server to an Amazon Linux 2023 server - so I’m OK installing and using cronie, this time around.