Conditional scheduled email report servicenow

thamy
Tera Contributor

Alguém sabe alguma condicional para programar o envio de um report que deva ser enviado todos os dias da semana exceto finais de semana?

4 REPLIES 4

AnveshKumar M
Tera Sage
Tera Sage

Hi @thamy,

 

You can use the following script (Você pode usar o seguinte script),

 

 

function isWeekEnd(){
	var ans = true;
	var nowGDT = new GlideDateTime();
	var dayWeek = nowGDT.getDayOfWeekUTC();
	if(dayWeek == 6 || dayWeek == 7){
		ans = false;
	}
	
	return ans;
}

isWeekEnd();

 

 

AnveshKumarM_0-1680527862111.png

 

Thanks,

Anvesh

Thanks,
Anvesh

Hello @thamy 

If my answer helped you to solve the issue, you can accept my answer as solution and close this thread.

 

Thanks,

Anvesh

Thanks,
Anvesh

Sandeep Rajput
Tera Patron
Tera Patron

Consulte este tópico para executar um trabalho agendado durante a semana https://www.servicenow.com/community/developer-forum/schedule-job-need-to-trigger-only-on-weekdays/m...

roddddhnhh
Kilo Contributor

I've been placing sports bets for a while now, and I recently discovered a fantastic website that aids me in selecting the greatest betting selections. This website compares several sportsbooks and other gaming venues and offers helpful advice on the wagers that have the best odds of paying off. I suggest this website https://rocketbets.com/br/  to everyone since I believe it will be helpful to everyone who is interested in sports betting and gambling.