3

I have aws image that I have created using ubuntu 16. Where I have cronjob running, I want to make sure that when I start new machine using this image, it (cronjobs) still run new machine.

when I tried following commands

1:

systemctl enable crond.service

I got following errors:

Failed to execute operation: No such file or directory

2:

systemctl status crond.service

I got following error:

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

3:

service crond status

I got following error:

● crond.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
1
  • 1
    AFAIK it's cron.service not crond.service Jul 25, 2017 at 16:41

3 Answers 3

4

4 ways to check status of cron service in Ubuntu:

ps -ef | grep cron

systemctl status cron.service

service cron status

/etc/init.d/cron status
1

As @steeldriver mentioned it is cron.service not crond.service difference with systemd. Anyways you can edit your cronjobs through crontab -ejust follow the instructions for setting the time for each cronjob at the bottom. And when you're done simply save the file and it should say "installing new cronjob", then voila it will magically execute the script at the given time.

0

Just run:

sudo systemctl enable cron

You must log in to answer this question.

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