Create a schedule job for request item

yardenKrispel
Tera Contributor

yardenKrispel_0-1713696748986.png

I need help! How do I do this task?

10 REPLIES 10

ok lets consider the end time to perform is a date time field 

 

so you will be doing a scheduled job like

var req = new GlideRecord('sc_req_item');
req.addencodedQuery('<yourfieldvalue_here>ONToday@javascript&colon;gs.beginningOfToday()@javascript&colon;gs.endOfToday()'); 
req.query();
while(req.next()){
gs.eventQueue.......
}

☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

yardenKrispel_0-1713697939803.png

Thanks! But in this window I do it? And how do I make a condition that every 7 AM it is carried out? The end field is a field I created

yes ur right just set the time as 07 and your done !  this will run the job every day at 7am


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

But I didn't understand the code: I need the following condition if yes then need to send notification to the admin group, and how do I do it in the code you wrote down for me, can you write it down for me more clearly?

yardenKrispel_0-1713700355722.png

yardenKrispel_1-1713700388063.png

 

yardenKrispel_2-1713700423056.png

 

I did everything it doesn't work