amazonlinux / amazon-linux-2023

Amazon Linux 2023
https://aws.amazon.com/linux/amazon-linux-2023/
Other
500 stars 38 forks source link

[Bug] - crontab not working #683

Open saintak opened 3 months ago

saintak commented 3 months ago

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):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

avoidik commented 3 months ago

please check https://github.com/amazonlinux/amazon-linux-2023/issues/300

zcobol commented 3 months ago

@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 commented 2 months ago

@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