Sample Script to create schedule entry via background scriptIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } This article contains a sample script to create schedule entry records via background script as some customers may consider to create it so in this way for their business requirements. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } All releasesResolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Again this is just a sample custom script and it outside ServiceNow support to provide implementation support. Please review and ensure to modify below script according to business requirements and verify it works correctly in all scenarios. var scheduleID = "0b9dd57e931256101a06be6efaba1010"//Sys_id of schedulevar show_as= "busy"var name ="New HongKong Schedule span for 5pm to 7am next day"var repeat_type ="specific"var days_of_week ="12345"var newScheduleEntry = new GlideRecord('cmn_schedule_span');newScheduleEntry.initialize();newScheduleEntry.schedule =scheduleID;newScheduleEntry.name = 'Schedule Entry Test record';newScheduleEntry.setValue("start_date_time", "20241014T090000Z") // Providing equiv values in GMT in this formatnewScheduleEntry.setValue("end_date_time", "20241014T230000Z") // Providing equiv values in GMT in this formatnewScheduleEntry.insert() A possible sample custom script on how to convert input value of date/ time via form function convertDateTimeWithTimeZone (dateTime, fromTimeZone, toTimeZone) { var scheduledDateTime = new GlideScheduleDateTime(dateTime); var newDateTime = new GlideDateTime(); newDateTime.setDisplayValue(scheduledDateTime.convertTimeZone(fromTimeZone, toTimeZone)); return newDateTime.getDisplayValueInternal();}var inpStr = "2024-10-14 17:00:00";var inpTZ = "US/Eastern";var outStr = convertDateTimeWithTimeZone(inpStr.split('+')[0].replace('T', ' '), inpTZ, 'GMT').replaceAll(':', '').replaceAll('-', '').replace(' ', 'T') + 'Z';gs.info(outStr); Output:--- 2024-10-14 17:00:00 - Input was US/ Eastern20241014T210000Z - Output is in GMT into GMT date/ time for above script to run.