I'm having problem getting my crontab to work in my ubuntu server 18.04 running as a amazon ec2 instance.
I have the following line in my /etc/crontab
file:
*/15 * * * * root /bin/bash /home/ubuntu/gzip/over_time_compile_ec2.sh
But it does not seem to work, and when running sudo service cron status
i get the following:
Feb 14 22:20:01 ip-172-31-15-110 CRON[15880]: pam_unix(cron:session): session opened for user ubuntu by (uid=0)
Feb 14 22:20:01 ip-172-31-15-110 CRON[15879]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 14 22:20:01 ip-172-31-15-110 CRON[15881]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 14 22:20:01 ip-172-31-15-110 CRON[15882]: (root) CMD (/home/ubuntu/gzip/compile_script.sh)
Feb 14 22:20:01 ip-172-31-15-110 CRON[15883]: (ubuntu) CMD (/home/ubuntu/gzip/compile_script.sh)
Feb 14 22:20:01 ip-172-31-15-110 CRON[15884]: (root) CMD (/bin/bash /home/ubuntu/gzip/over_time_compile_ec2.sh)
Feb 14 22:20:01 ip-172-31-15-110 CRON[15881]: (CRON) info (No MTA installed, discarding output)
Feb 14 22:20:01 ip-172-31-15-110 CRON[15881]: pam_unix(cron:session): session closed for user root
Feb 14 22:20:01 ip-172-31-15-110 CRON[15880]: (CRON) info (No MTA installed, discarding output)
Feb 14 22:20:01 ip-172-31-15-110 CRON[15880]: pam_unix(cron:session): session closed for user ubuntu
I see the line (CRON) info (No MTA installed, discarding output)
, but it should not make my CRON fail right?
>/tmp/otce.log 2>&1
to the end of yourcrontab
entry and take a look inside that file after the next 15 minute cycle.