#1 2019-04-24 07:26:39

joergnestler
Member
Registered: 2019-03-28
Posts: 12

--on-error / --on-success

I have issues to setup my Job. In the GUI I never succeeded to set the option for "on success" thats why I edited the Job File manually. I also looked for this topic in other posts here, but all the samples I found doesnt work for me. Is there an FAQ or a sample for a JOB-File where I can see how to write the Arguments for "on success".

I tried in my File:
--on-success="backupId->002" \

and

--on-success=""backupId->002"" \

In the Log I always get the result:

"Backup job 002 is not present in the local /jobs directory"

In the jobs subfolder the ID (Name of the Jobfile) for the Job is "2".
Must I setup my Jobfiles also with 3 digits numeric?

Thanks for your help

Offline

#2 2019-04-24 07:59:39

admin
Administrator
Registered: 2017-04-21
Posts: 1,367

Re: --on-error / --on-success

Yes, of course. Job Ids are strings, not numbers, thus 2 != 002

Offline

#3 2019-04-24 09:14:05

joergnestler
Member
Registered: 2019-03-28
Posts: 12

Re: --on-error / --on-success

so far so good - but how can I solve my problem?

name of the jobfile to run on success is "2"

and in the former Job I settet up:

--on-success="backupId->002" \

What I did wrong?
I have to rename the Jobfile from 2 into 002 ?

Thanks for you answer in advance

Last edited by joergnestler (2019-04-24 09:16:37)

Offline

#4 2019-04-24 11:21:33

admin
Administrator
Registered: 2017-04-21
Posts: 1,367

Re: --on-error / --on-success

Rename the job:

mv 2 002

And change the name of it in your cron files:
- .../xsi-dir/root-crontab
- /var/spool/cron/crontabs/root

You may need to change permissions on your ESXi crontab to be able to edit it, if so:

chmod 0700 /var/spool/cron/crontabs/root
vi /var/spool/cron/crontabs/root
chmod 0600 /var/spool/cron/crontabs/root

Offline

#5 2019-04-25 07:59:58

joergnestler
Member
Registered: 2019-03-28
Posts: 12

Re: --on-error / --on-success

thanks a lot for your great support - works fine

Offline

Board footer