Servicely Administration
Scripting
Job API
2 min
a job is a server side script that runs on a schedule (e g every day, every week, etc) out of box examples include name period purpose incident autoclosure for resolved incidents every day auto closes resolved incidents that had been resolved for more than pre configured number of days (defined in application property “incident auto closure days“) itsm request autoclosure for completed requests every day auto closes resolved requests that had been completed for more than pre configured number of days (defined in application property “itsm request auto closure days“) knowledge auto archive knowledge every hour auto archives a knowledge article that is published but with an auto archive date set creating a job navigate to administration > configuration > jobs and click “new” on the list of jobs the following are the fields that need to be set for every job configuration record we have also included examples on the right most column field name field type description example value job name string name of the job (custom) write internal notes as a reminder for ageing incidents active boolean if active, the job will run at the specified interval set to no if you no longer want a job record to run yes cron expression how often and when you want the job to run click on the asteriks ( ) icon to the right of the field, to open a pop up that will let you choose when the job should run open image 20240809 042727 png open image 20240809 044502 png every day, at 1 00 am please double check what you put in here avoid selecting “every minute” in the “minutes” tab, so no unnecessary load is placed onto your servicely environments description text description of the job runs everyday to find any incident that are open and hasn’t been updated for more than 14 calendar days, write into the work journal to remind the assignment group/assignee script script the server side script you want to run when the job is executed