Start job activity - delay befor starting?

Hello,
I have a job that restarts the machine due to an error. I want to start a new job afterwards with the job start activity, but I need a delay before the new job starts. Otherwise, the new job starts immediately and does not wait for the machine to restart. So an error occurs.

I have tried creating an item in a queue that has a trigger, but that would also start immediately, or does not work with a deferred item.

Thank you very much for your help!
Moritz

1 Like

Hello @mm1904 ,

So in the new job can you add some wait for element exists approach to wait for some time. Else if you are going with Queue based trigger, then maybe you can try the postpone feature of queue item.

Hey @mm1904

What’s the ideal time for restarting the machine here…

Also, if you are gonna run the job in the same VDI machine robot what I guess is it will go to pending and once the robot service is available after restart the job start and runs.

Thanks
#nK

Hey @Rahul_Unnikrishnan and @Nithinkrishna ,
thanks for your answers.

The problem is, that after the restart-job the orchestrator starts the next job immidieatly, not after the restart. Some seconds later, the machine restarts and the UiPath-robot-service stops with an error. So the new job fails and won’t start after the machine restart. If I do a delay in the restart job, this job will end with an error, as the UiPath-robot-service is terminated.

And I don’t want to produce errors if I can avoid that.

Moritz

1 Like

Hey @mm1904

Could you please show that error once ?

Thanks
#nK

Hello @Nithinkrishna ,
the error is like this:
grafik
“The job stopped with unexpected error 0x40010004” This error code is quite normal when a program is terminated by windows shutdown, I think: windows - In which cases does program exit with 0x40010004 code? - Stack Overflow

The job no. 1 restarts the machine,
no. 2 was started by no. 1 and is only build to be hit by the error.
no. 3 was also started by no. 1 and run after the restart.


But I don’t like to have a no. 2 and get an error.

Regards, Moritz

1 Like

Is this resolved? Did you get solution for this?

Hi,
I solved it with a second robot machine: The restart-job produces a queue item with defer-time 2 minutes. While checking all queues, a second robot finds that item and sends a ‘start job’ for the restarting machine.
With theese 2 minutes delay, the UiPath-service is stopped and the new job is started, when the machine is restarted. So I don’t get any errors.

It works, but is not what I wanted, because you need some more machines looking for each other. If all machines have a problem, they won’t restart each other.

Regards,
Moritz

Okay @mm1904

I have the requirement where I want to start the job on the orchestrator from my studio.

But when I will start the job using start job activity I need it to be started after 15 minutes.

How I can achieve this? If you have any ideas please suggest.

Hi,
I wondered if it is possible to create a trigger by the orchestror API with the date/time you need and use it to start job. But in my swagger I can’t find anything about the triggers. So I don’t a better solution than mine using a second machine.

Regards,
Moritz

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.