Crontab missing from most recent AWS Linux AMI
I have installed al2022-ami-2022.0.20220419.0-kernel-5.15-x86_64 on a m5.2x. I went to install a user cron and the crontab binary is missing. This is a default linux binary. The system cron seems to be fine (though I haven't tested it) but user crons are not working.
ec2-user $ crontab -l
-bash: crontab: command not found
ec2-user $ which crontab
/usr/bin/which: no crontab in ...
ec2-user $ ls /usr/bin/crontab
ls: cannot access '/usr/bin/crontab': No such file or directory
This is fine in previous versions with the default install. Here it is with a default version of amzn2-ami-kernel-5.10-hvm-2.0.20220406.1-x86_64-gp2 also installed on an m5.2x
ec2-user $ which crontab
/usr/bin/crontab
Hello,
Thank you for your post. I launched a test instance using the al2022-ami-2022.0.20220419.0-kernel-5.15-x86_64 AMI and verified your report. The cronie package, which provides the crontab command, is not included in this AMI.
# rpm -qa |grep -i cron
crontabs-1.11-24.20190603git.amzn2022.noarch
I also checked the previous version of the AL2022 AMI and confirmed that the cronie package was not present there either. I would suggest you manually install the cronie and cronie-anacron packages that are both available from the amazonlinux repository.
yum install cronie cronie-anacron
Note, you can also make use of user data scripts[1] to install these packages at the time of launching instances.
In the meantime, I have opened an internal ticket with the Amazon Linux team to report that these packages are not included in the AL2022 images.
References:
[1] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html
Relevant questions
how to create snapshot routine in AWS
Accepted Answerasked 3 years agoAWS Lambda, Python : Call Shell script from Lambda or Linux command
Accepted Answerasked 3 years agoCrontab entries ignored on Amazon Linux 2 instance
asked 3 years agoCrontab missing from most recent AWS Linux AMI
asked 2 months agoCrontab is updated at every deplo
asked 3 years agoAmazon Linux 1 reqeust: php 7.3 packages for imagick & mcrypt
asked 3 years agoCreate a desktop session from Amazon Linux 2 to a windows machine
asked 3 months agoHow do i fix the "ERROR: The request is missing a valid API key." from my wordpress installation
asked 3 months agoCron jobs on Ubuntu EC2 Instance
asked 5 months agoIs there antivirus software recommended to install AWS Linux 2 system?
asked 2 months ago