Scheduled report to run on weekday only

tick the 'conditional' box and paste in the following code:


var answer=false;
var now = new GlideDateTime();
//Run only on weekdays
var DoW=now.getDayOfWeek();
answer = (DoW < 6 && DoW> 1);
answer;

Comments

Popular posts from this blog

Running transform maps asynchronously

Post a command to the ECC queue for the mid server to initiate a powershell file copy

GlideRecord setValue