Cronjob Script not working for Graviton based EC2 instance with encryption enabled on EBS volume

161 Views Asked by At

I have one Ubuntu 18.04.6 LTS EC2 Instance having Graviton2 arm64 Architecture. I have also enabled encryption on EBS volume.

I configured some cronjob bash script.

I was able to run those script manually by ./backup-script.sh command.

But when configured cron job below.

0 4 * * * /bin/sh /path/to/script/backup-script.sh

It is not able to execute.

I have other EC2 instances where cron job is running successfully but those are not graviton2 based instance neither EBS encryption enabled on them.

2

There are 2 best solutions below

0
tanveen bharaj On

Have you checked logs grep CRON /var/log/syslog? It should have worked. Verified by running simple cron job on Grv2 instance Ubuntu 18.

1
kgcwc09 On

I found the solution. Cronjob script is now working in graviton.

But any data from /var/ directory is not getting copy to s3.

It gives below error-

"The user-provided path /var/www/ does not exist."