Run scheduled job from script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2023 06:57 AM
Hi, is there any way to run a scheduled job from client/server script?
Thanks in advance 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2023 07:02 AM - edited ‎01-16-2023 07:03 AM
@Snow Tomcal Yes we can run it from server script or client callable script include
Please see the link for trigger a scheduled job from the Business rule
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Regards,
RJ

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2023 07:28 AM
Hi @Snow Tomcal ,
There are multiple ways through which you can run a scheduled job either from client side or server side.
From server side
var scheduledJob= new GlideRecord('sysauto_script');
scheduledJob.newRecord();
scheduledJob.name = current.name;
scheduledJob.active = true;
scheduledJob.run_type = 'once';
scheduledJob.run_start = current.time;
scheduledJob.script = ''// if you need some script to be running;
You can achieve the same via client side as well, you need to use same script in script include and trigger that script include from a client script.
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2023 07:31 AM
Hi @Snow Tomcal,
Take a look at article - Execute Scheduled Jobs From Script
Thanks,
Sagar Pagar