Highlighted
Regular Contributor.. Regular Contributor..
Regular Contributor..
251 views

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.

0 Likes
1 Reply
Highlighted
Knowledge Partner
Knowledge Partner

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

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.

Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.