Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to create scheduled task

Brahmi Pandla
Tera Guru

Hi Everyone

i created the scheduled job with below script for creating task

 

var createTsk = new GlideRecord('sc_task');
createTsk.initialize();
createTsk.requested_for = '661b4be04f00b7406209ecee0210c73b';
createTsk.short_description = 'update the conference room data';
createTsk.description = 'get the conference room data from AD, upload csv import in the task, and reassign task to TCS_Tools team';
createTsk.u_category = 'software_bus_app';
createTsk.u_subcategory = 'Data';
createTsk.assignment_group = 'e74c2a2fdb8b8810245b18df4b9619b5';
createTsk.state = '1';
createTsk.insert();
 
 
requested_for updated with the value
 
Could you please help on this
9 REPLIES 9

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Brahmi Pandla 

 

The best and simple way, use flow designer. 

 

Trigger: Daily

Action: Look up records

Flow logic: For each

Action: Create record 

end flow.

 

Fully NO CODE.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi  AG

 

Thanks for response 

i have to create the task weekly once

 

 

 

Hi @Brahmi Pandla 

 

yes, you can do that.

 

AGLearnNGrow_0-1742467247394.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi AG

 

I created same and update the fields below  but requested for filed getting empty

BrahmiPandla_0-1742467929329.png