AWS Thinkbox Discussion Forums

Schedule Periodic Task

Hello,

I’ve written a custom plugin to update SVN’s working copy for our render machine.

How can I use deadline to requeue the job for this plugin everyday at 1 am?

I’ve explored the Scheduling option in Job Properties. However, I don’t quite understand how to configure this properly. The documentation on this feature seem very limited.

Another option that I looked at is Requeuer.zip

from Schedule a job to run every hour - #5 by Bobo

Unfortunately, I don’t know how to debug HouseCleaningEvent, so I have no idea whether the script is working properly or not.

The option that I’m currently using is to use Windows Task Scheduler and deadline API to requeue my completed task. This work for now, but it does not seem transparent and easy to maintain.

Is there a way in deadline to setup Job that run periodically?

Regards,
Tu

Hi Tu,

Open the Job Properties dialog and navigate to the Scheduling section. For your case all you have to do is select “Repeating” mode, enter the start date and time, and leave Day Interval at 1. Do not check “Stop Date and Time” and it will repeat forever.

When you do this, the following Job Info Parameters get added:

ScheduledStartDateTime=06/08/2024 10:00
ScheduledType=Daily

So you could write a submitter that submit a Python script job with these keys, and it would create a repeating job. However, it might be easier to submit a regular job and then modify its Scheduling settings in the UI…

Regarding the OnHouseCleaning Event, the house cleaning might be performed by a different component depending on your settings - either by a Worker, by a Pulse, or by the Remote Connection Server if it is running. Thus, finding the House Cleaning log can be tricky. But in the Configure Repository Options dialog, under House Cleaning > House Cleaning tab, you have a checkbox to “Run House Cleaning in a Separate Process” and “Write House Cleaning Output to Separate Log File”. So if you have Pulse or RCS running the process, you will also get a separate log file housecleaning-(machinename)-(date).log under the C:\ProgramData\Thinkbox\Deadline10\logs folder of the machine that runs the service performing the operation. This makes it easier to see if your events are running properly.

Cheers,
Bobo

1 Like

Hi Bobo,

Thank you very much for the explanation. I think I understand this better now. In the context of “Repeating” Scheduling mode, the “State Date and Time” means the date and time the this scheduling rule is in effect.

In the following screenshot. I’ve set the star date and time as 2024/08/07 19:00:00, which means 7 PM on 7th Aug, 2024.

Am I correct that, this job will be automatically start at 7 PM everyday from now?

Regards,
Tu

That is correct, however, as the documentation states, there is one more detail to keep in mind:

It should be noted that if the job is not put into the Pending state, the job will not wait for the scheduled time to begin rendering. When the scheduling settings change, you will be prompted to put the job in the pending state. This can also be done by right clicking the job and choosing ‘Mark as Pending’.

So you must put the job in Pending state for the Scheduling to work as expected.

1 Like

Thank you very much for your help.

Hello @Bobo,

The task scheduling works. Unfortunately, sometime the task stuck at the “complete” state and did not get to the “pending” state automatically.

In the picture below, the task was running fine from the 2024/08/06 to 2024/08/09. Then, it was marked as Complete, so I have to manually set the task back to pending this morning to fix.

image

Is there any way that we can debug or fix this issue?

To give some more context, there are three task in the job.

Regards,
Tu

Hi Tu,

I would start by looking through the logs to see what caused the state change.

Hi @Bobo, thank you for the response.

I’ve just read through this to see what where and what logs would be relevant.

https://docs.thinkboxsoftware.com/products/deadline/10.3/1_User%20Manual/manual/logs.html

I’ve checked the worker logs on deadline monitor and the machine and wasn’t able to find anything relating to setting job status to pending.

Will you give me some guidance on where the logs for setting job status would be?

I would expect the Job’s Task logs to contain info around the end of each run.

However, I must admit I have never used this type of job in production and don’t have first hand experience with debugging it.

Also I would like to point out that I joined this thread because I was tagged, but I left the AWS Thinkbox team nearly 3 years ago and don’t participate regularly in this forum anymore. You might have to get someone from the Support team to look into this. :slight_smile:

Thank you. You are a great human being.

Hi @karpreet @zainali Would you be able to provide some guidance on this issue for me please?

Privacy | Site terms | Cookie preferences