It's like not only Amazon Linux 2 I could not setup cron. I type
crontab -e
then
@reboot bash /home/ec2-user/abcd.sh
After Rebooting the EC2, this cron job doesn't work. The same used to work in my Linode VM which had centos 8
Can someone please help me how can I setup cronjobs in Amazon Linux 2
@keywordsyntax is AFAIK not supported by every cron implementation. Checkman 5 crontabif it is. Additionally if the keyword syntax is supported: the last line in a crontab file needs to be terminated with a newline / ENTER and relying on relative paths (i.e.bashinstead of/bin/bash) can be an issue too. – Bob Jun 02 '21 at 08:31