# Current Schedule Data

**URL:** <https://forum.inductiveautomation.com/t/current-schedule-data/35153>\
**Category:** Ignition\
**Created:** [May 29, 2020, 12:30pm UTC](https://forum.inductiveautomation.com/t/current-schedule-data/35153 "2020-05-29T12:30:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![john.ackley](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@john.ackley](https://forum.inductiveautomation.com/u/john.ackley)\
**Post date:** [May 29, 2020, 12:30pm UTC](https://forum.inductiveautomation.com/t/current-schedule-data/35153/1 "2020-05-29T12:30:11Z")

</div>

Is there a way to grab the current running schedule’s data to use in a script? I am trying to compare a production run’s end date and time to the current schedule’s end date and time for some calculations I need to do. Thank you

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 31, 2020, 7:32am UTC](https://forum.inductiveautomation.com/t/current-schedule-data/35153/2 "2020-05-31T07:32:58Z")

</div>

You’re going to have to be more specific… Scheduling, as far as I know, is not inbuilt ignition functionality. Are you using a particular 3rd party module for this, eg the sepasoft mes module?  
Also, won’t your current schedule end date be indeterminate, due to there being many unknown variables? (line hold ups, breakdowns, unknown quantities of rejections, etc. Etc.)

---

<div class="post-metadata">

**Author:** ![john.ackley](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@john.ackley](https://forum.inductiveautomation.com/u/john.ackley)\
**Post date:** [June 2, 2020, 9:19pm UTC](https://forum.inductiveautomation.com/t/current-schedule-data/35153/3 "2020-06-02T21:19:15Z")

</div>

I am talking about the alarm schedules setup in the gateway. I would like to grab the start date and time of that schedule to use in another script.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/08bfeca71675241e98f178dc5cd10f1185efeb35.png)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 2, 2020, 9:44pm UTC](https://forum.inductiveautomation.com/t/current-schedule-data/35153/4 "2020-06-02T21:44:21Z")

</div>

Have a read of the user manual  
[https://docs.inductiveautomation.com/display/DOC80/User+Schedules](https://docs.inductiveautomation.com/display/DOC80/User+Schedules)

And see the user functions:  
[https://docs.inductiveautomation.com/display/DOC80/system.user](https://docs.inductiveautomation.com/display/DOC80/system.user)

There are functions to get user schedule config

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [June 2, 2020, 9:47pm UTC](https://forum.inductiveautomation.com/t/current-schedule-data/35153/5 "2020-06-02T21:47:04Z")

</div>

There isn’t currently an easy way to get this. system.user.getSchedule() gives you an AbstractScheduleModel, which currently could be an instance of a BasicSchedule or a CompositeSchedule. Once you drill down to the component BasicSchedules, the information you can get is like what you see in the screen where you set it up – a string for the time on Monday, Tuesday, etc. You would need to do the parsing from there.

---

<div class="post-metadata">

**Author:** ![john.ackley](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@john.ackley](https://forum.inductiveautomation.com/u/john.ackley)\
**Post date:** [June 3, 2020, 2:17pm UTC](https://forum.inductiveautomation.com/t/current-schedule-data/35153/6 "2020-06-03T14:17:27Z")

</div>

Thank you Kathy. I’ll give that a try
