amazon-linux-2023 icon indicating copy to clipboard operation
amazon-linux-2023 copied to clipboard

[Bug] - crontab not working

Open saintak opened this issue 1 year ago • 3 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.

saintak avatar Apr 03 '24 11:04 saintak

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

avoidik avatar Apr 03 '24 14:04 avoidik

@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 avatar Apr 03 '24 16:04 zcobol

@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

saintak avatar Apr 07 '24 11:04 saintak