3

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

MrVaykadji
  • 5,965

1 Answers1

10

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.

pl_rock
  • 11,715