Schedule job run on every Monday Wednesday and Friday for deleted incidents which are category is Hardware.

panduranga1
Tera Contributor

Hello Team,

Schedule job run on every Monday Wednesday and Friday for deleted incidents which are category is Hardware or Software. Please send me the solution.

 

Thanks

Panduranga K.

6 REPLIES 6

Community Alums
Not applicable

HI @panduranga ,

You can use this solution :

https://community.servicenow.com/community?id=community_question&sys_id=a925d08b1bd4f49017d162c4bd4b...

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Community Alums
Not applicable

HI @panduranga ,

Any update to this ?Any follow-up required? if not

Kindly mark the answer as Correct & Helpful both such that others can get help.

Thanks,
Sandeep

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can make the job run daily and in the condition field check if it's Monday/Wednesday/Friday

I hope you are comfortable in writing scheduled job script

answer = checkCondition();

function checkCondition(){
	var gdt = new GlideDateTime();
	var dayOfWeek = gdt.getDayOfWeekLocalTime();
	
	// 1 is Monday, 2 is Tuesday
	
	if(dayOfWeek == 1 || dayOfWeek == 3 || dayOfWeek == 5){
		return true;
	}
	else{
		return false;
	}
}

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@panduranga 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader