1

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

Am3Y
  • 67
  • 5
  • The `@keyword` syntax is AFAIK not supported by every cron implementation. Check `man 5 crontab` if 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. `bash` instead of `/bin/bash`) can be an issue too. – Bob Jun 02 '21 at 08:31

0 Answers0