3

I am trying to add a cron job to backup a database on my server (instance EC2 t2 micro, ubuntu 16.4 server). The script works, and the cron line should be ok:

* * * * * /home/ubuntu/backup.sh

Yet, it was not executed. So I did:

service crond status

and got:

● crond.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

when I do :

service crond start

I get:

Failed to start crond.service: Access denied
See system logs and 'systemctl status crond.service' for details.

Being very unskilled with bash things, and considering it might be related to the way Amazon EC2 ubuntu is set up, here I am. Do you know what I could do to get the crond service back up?

EDIT: well, so the service name was cron. And it is executed every minute as it should. I guess there is an issue with my script.

3
  • It should be cron not crond. What is the output of service cron status
    – stumblebee
    Mar 29, 2018 at 6:18
  • 1
    My bad. It is executed every minute as it should. Mar 29, 2018 at 6:22
  • 1
    @stumblebee you should post a quick answer so that it ends up with some kind of closure :-). Thanks by the way Mar 29, 2018 at 6:25

1 Answer 1

2

To check the status of cron run:

service cron status

Instead of "crond"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .