scheduled job execute now not working

Purushotham1992
Tera Contributor

Hi,

I have written a scheduled job to execute daily at 6 am to add user to one group and  after writing the code when I saved it and clicked on execute now button, page refreshes but it do not do anything i.e. script do not executes.

But when I copy the same code and executes it from Background script it works perfectly fine. can anyone please provide the solution ?

2 REPLIES 2

AnveshKumar M
Tera Sage
Tera Sage

Hi @Purushotham1992 

Ideally it should if it works in Background Script.

 

Have you added any logs in the code? If possible please share your code and Scheduled Job configuration screenshot.

 

Thanks,
Anvesh

P_B
Tera Contributor

Hello,
Please check for any Best practices conditions on the script and also try to add 

gs.info(""), so that you will come to know if the script is running.