I have a script that creates a cron job to take a backup of a local MongoDB. When I execute crontab -l command, I see following:

* */1 * * * cd /home/user/shell-scripts && sh mongo-backup.sh 

I previously configured the same cronjob to run every minute but then I edited it. I have restarted my machine after editing the job.

What am I doing wrong?

Thanks

0

1 Answer

use 0 at place of first * like :

0 */1 * * * cd /home/user/shell-scripts && sh mongo-backup.sh 

if you use * it means it will execute every minute.

5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy