amazonlinux / amazon-linux-2023

Amazon Linux 2023

Home Page:https://aws.amazon.com/linux/amazon-linux-2023/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] - crontab not working

saintak opened this issue · comments

Describe the bug
Compared to al2, al2023 does not install cronie by default, so the crontab command cannot be run and cronie should be manually installed. But the strangest thing is that if you manually uninstall crontab and then reinstall it, cronie will be installed as an installation dependency
However, regardless of the method used, after installing cronie, it is necessary to manually start crond.service, which can cause a lot of trouble for customers. Therefore, I believe this is a missing installation package dependency, and I hope the new al2023 image include cronie
To Reproduce
Steps to reproduce the behavior:

  1. run a new and clean al2023 instance
  2. ssh in to the instance
  3. run the command crontab, then you will find "command not found"
  4. See error

Expected behavior
I hope I can use the command crontab which include in the packge cronie, yet cronie is not installed by al2023 by default. but crontabs and cronie-anacron are installed by default,

Screenshots
If applicable, add screenshots to help explain your problem.
QQ截图20240403190950
QQ截图20240403191146

Desktop (please complete the following information):

  • OS: [windows 11]
  • Browser [chrome]
  • Version 123.0.6312.106]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

please check #300

commented

@saintak it's a feature not a bug! If you check the package comparison between AL2 AMI and AL2023 AMI cronie is not part of the later image indeed. I don't know the rationale behind this decision. See complete list at https://docs.aws.amazon.com/linux/al2023/ug/amzn2-al2023-ami.html

Also, cron is deprecated in AL2023:

The cronie package was installed by default on the AL2 AMI, providing support for the traditional crontab way of scheduling periodic tasks. In AL2023, cronie is not included by default. Therefore, support for crontab is no longer provided by default.

More at https://docs.aws.amazon.com/linux/al2023/ug/deprecated-al2023.html

@saintak it's a feature not a bug! If you check the package comparison between AL2 AMI and AL2023 AMI cronie is not part of the later image indeed. I don't know the rationale behind this decision. See complete list at https://docs.aws.amazon.com/linux/al2023/ug/amzn2-al2023-ami.html

Also, cron is deprecated in AL2023:

The cronie package was installed by default on the AL2 AMI, providing support for the traditional crontab way of scheduling periodic tasks. In AL2023, cronie is not included by default. Therefore, support for crontab is no longer provided by default.

More at https://docs.aws.amazon.com/linux/al2023/ug/deprecated-al2023.html

@zcobol @avoidik thank you for your reply

if this is a feature, I think it should also remove the crontabs package, but not leave it alone without cronie. both in or both out