Schedule Job to Reject Change Request when planned.start-tod()<2 days

Hi all,

I want to create a schedule job which will scan all Change Requests (e.g. every minute) & reject those with
planned.start-tod()<2 days
Probably set approval.status="denied" so that it undergoes automatic transitions to the phase "Rejected".

I browsed some topics and seems it is done by creating a schedule record, however there are many fields on the schedule record form and I am not sure how to achieve what I want to do.

Can anyone help me to achieve this?
Many thanks.

  • Hi Jennifer,

    First you need to do is develop a script that will get all changes that meet your criteria and reject them. 

    Then you can create a schedule that call the script you create and runs every minute.

    I think it would be simpler if you have such thing running only once per day. Let's say that every day at 00:01 you reject pending changes planned for next two days; Regardless the case, check if the query you are doing is using the index; try to use also the flag field.