User defined cron job repeats

  • I have a cron job that uses Syncoid to sync my zfs volume between my OMV servers. Running the sync by hand works. If I let it run on it schedule if will repeat, every minute for 1 hour. While it's fine to run this way because Syncoid will only allow one sync at a time I can't turn on the email notifications as I get spammed 60 times an hour.


    Here's a sample of the log output. It repeats 60 times.


    May 8 09:01:01 "source" CRON[20502]: (root) CMD (/var/lib/openmediavault/cron.d/userdefined-ef1b462c-0ff0-40c8-ab57-f794e3d5c517 >/dev/null 2>&1)
    May 8 09:02:01 "source" CRON[11487]: (root) CMD (/var/lib/openmediavault/cron.d/userdefined-ef1b462c-0ff0-40c8-ab57-f794e3d5c517 >/dev/null 2>&1)
    May 8 09:03:01 "source" CRON[1070]: (root) CMD (/var/lib/openmediavault/cron.d/userdefined-ef1b462c-0ff0-40c8-ab57-f794e3d5c517 >/dev/null 2>&1)
    May 8 09:04:01 "source" CRON[24325]: (root) CMD (/var/lib/openmediavault/cron.d/userdefined-ef1b462c-0ff0-40c8-ab57-f794e3d5c517 >/dev/null 2>&1)
    May 8 09:05:01 "source" CRON[16240]: (root) CMD (/var/lib/openmediavault/cron.d/userdefined-ef1b462c-0ff0-40c8-ab57-f794e3d5c517 >/dev/null 2>&1)
    May 8 09:06:01 "source" CRON[7887]: (root) CMD (/var/lib/openmediavault/cron.d/userdefined-ef1b462c-0ff0-40c8-ab57-f794e3d5c517 >/dev/null 2>&1)
    May 8 09:07:01 "source" CRON[29517]: (root) CMD (/var/lib/openmediavault/cron.d/userdefined-ef1b462c-0ff0-40c8-ab57-f794e3d5c517 >/dev/null 2>&1)
    May 8 09:08:01 "source" CRON[19662]: (root) CMD (/var/lib/openmediavault/cron.d/userdefined-ef1b462c-0ff0-40c8-ab57-f794e3d5c517 >/dev/null 2>&1)
    May 8 09:09:01 "source" CRON[11860]: (root) CMD (/var/lib/openmediavault/cron.d/userdefined-ef1b462c-0ff0-40c8-ab57-f794e3d5c517 >/dev/null 2>&1)


    Here's the script.
    #!/bin/sh
    syncoid --recursive --quiet tank/vol1 root@"destination":tank/vol1


    I've tried adding the #!/bin/sh -l, removing the #!/bin/sh. I modified the .profile (test -t 0 && mesg n || true) and it got rid of the tty error but my task still repeats. I originally didn't have a script and was running the Syncoid command directly. I used the script to troubleshoot. The logs don't report anything useful that I can find. Any advise of what I might check?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!