#1 2018-11-06 04:10:01

newmember
Member
Registered: 2018-10-15
Posts: 34

--on-success= chaining runs the same job 4 times

I figured job 041 would run then chain the next jobs until finished, but the same job 041 runs 4 times.



cron:
[root@esx41:/etc] cat /var/spool/cron/crontabs/root
#min hour day mon dow command
1    1    *   *   *   /sbin/tmpwatch.py
1    *    *   *   *   /sbin/auto-backup.sh
0    *    *   *   *   /usr/lib/vmware/vmksummary/log-heartbeat.py
*/5  *    *   *   *   /sbin/hostd-probe ++group=host/vim/vmvisor/hostd-probe
00   1    *   *   *   localcli storage core device purge
*/2 * * * * /usr/lib/vmware/vsan/bin/vsanObserver.sh
* 23 * * 1,2,3,4,5 "/vmfs/volumes/datastore1/xsi-dir/jobs/041"


Jobs:

[root@esx41:/etc] cat /vmfs/volumes/datastore1/xsi-dir/jobs/041
"/vmfs/volumes/datastore1/xsi-dir/xsibackup" \
--backup-prog=OneDiff \
--backup-point=/vmfs/volumes/QNAP-Archive \
--backup-type=Running \
--backup-how=Hot \
--backup-id=041 \
--description="esxi-041-oneDiffBackup" \
--use-smtp=1 \
--mail-to=EMAIL@DOMAIN.com \
--on-success=""backupId->042"" \
--on-error=""backupId->042"" \
--subject="esxi-041-oneDiffBackup" \
--exec=yes >> "/vmfs/volumes/datastore1/xsi-dir/var/logs/xsibackup.log"

[root@esx41:/etc] cat /vmfs/volumes/datastore1/xsi-dir/jobs/042
"/vmfs/volumes/datastore1/xsi-dir/xsibackup" \
--backup-prog=OneDiff \
--host=10.240.100.42:22 \
--backup-point=/vmfs/volumes/QNAP-Archive \
--backup-type=Custom \
--backup-how=Hot \
--on-success=""backupId->043"" \
--on-error=""backupId->043"" \
--use-smtp=1 \
--mail-to=EMAIL@DOMAIN.com \
--subject="esxi-042-oneDiffBackup" \
--backup-id=042 \
--description="esxi-042-oneDiffBackup" \
--backup-vms="Sales-Demo2 1_Clean" \
--exec=yes >> "/vmfs/volumes/datastore1/xsi-dir/var/logs/xsibackup.log"

[root@esx41:/etc] cat /vmfs/volumes/datastore1/xsi-dir/jobs/043
"/vmfs/volumes/datastore1/xsi-dir/xsibackup" \
--backup-prog=OneDiff \
--host=10.240.100.43:22 \
--backup-point=/vmfs/volumes/QNAP-Archive \
--backup-type=Running \
--backup-how=Hot \
--on-success=""backupId->045"" \
--on-error=""backupId->045"" \
--use-smtp=1 \
--mail-to=EMAIL@DOMAIN.com \
--subject="esxi-043-oneDiffBackup" \
--backup-id=043 \
--description="esxi-043-oneDiffbackup" \
--exec=yes >> "/vmfs/volumes/datastore1/xsi-dir/var/logs/xsibackup.log"

[root@esx41:/etc] cat /vmfs/volumes/datastore1/xsi-dir/jobs/045
"/vmfs/volumes/datastore1/xsi-dir/xsibackup" \
--backup-prog=OneDiff \
--host=10.240.100.45:22 \
--backup-point=/vmfs/volumes/QNAP-Archive \
--backup-type=Running \
--backup-how=Hot \
--remote-xsipath=/vmfs/volumes/port-esx-data-store \
--use-smtp=1 \
--mail-to=EMAIL@DOMAIN.com \
--backup-id=045 \
--description="esxi045onediffBackup" \
--exec=yes >> "/vmfs/volumes/datastore1/xsi-dir/var/logs/xsibackup.log"

Offline

#2 2018-11-06 11:08:49

sistemi
Member
Registered: 2017-08-29
Posts: 71

Re: --on-success= chaining runs the same job 4 times

Crontab guru says “At every minute past hour 23 on Monday, Tuesday, Wednesday, Thursday, and Friday.”  The crontab line should be
0 23 * * 1,2,3,4,5 "/vmfs/volumes/datastore1/xsi-dir/jobs/041"

Offline

#3 2018-11-07 07:19:48

newmember
Member
Registered: 2018-10-15
Posts: 34

Re: --on-success= chaining runs the same job 4 times

Thank you very much.
Interesting cron didnt run any jobs Tuesday.

Offline

Board footer