# Report scheduling

**URL:** <https://forum.inductiveautomation.com/t/report-scheduling/11971>\
**Category:** General Discussion\
**Created:** [July 26, 2016, 4:02am UTC](https://forum.inductiveautomation.com/t/report-scheduling/11971 "2016-07-26T04:02:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ase\_aust](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@ase\_aust](https://forum.inductiveautomation.com/u/ase_aust)\
**Post date:** [July 26, 2016, 4:02am UTC](https://forum.inductiveautomation.com/t/report-scheduling/11971/1 "2016-07-26T04:02:25Z")

</div>

Is there a built in control to allow users to schedule a report or would I have to create the schedule and manage it myself ?

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [August 1, 2016, 10:33pm UTC](https://forum.inductiveautomation.com/t/report-scheduling/11971/2 "2016-08-01T22:33:47Z")

</div>

You would have to manage this yourself. You can use a memory tag to hold the timestamp for when you want the report to execute. Then you can call the report.executeAndDistribute or executeReport function.

---

<div class="post-metadata">

**Author:** ![ase\_aust](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@ase\_aust](https://forum.inductiveautomation.com/u/ase_aust)\
**Post date:** [August 5, 2016, 9:18am UTC](https://forum.inductiveautomation.com/t/report-scheduling/11971/3 "2016-08-05T09:18:29Z")

</div>

Greg,

Thanks for that. I had thoughts down that line but when I started thinking about parameters for reports and doing all the things a report scheduler does for you, it became a very big task.

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [August 12, 2016, 4:30pm UTC](https://forum.inductiveautomation.com/t/report-scheduling/11971/4 "2016-08-12T16:30:21Z")

</div>

shouldn’t be to difficult to do. You actually need two tags. One to hold the date you want the report to be generated on, and another to trigger the report. You could even hold the parameters you want to pass to the function in memory tags as well, if you really want this to be customizable. You can use this expression

`timeBetween(dateFormat(now(), "yyyy-MM-dd HH:mm:ss"), 
dateFormat({[~]Report Generate Time}, "yyyy-MM-dd HH:mm:ss"), 
dateArithmetic(toDate(dateFormat({[~]Report Generate Time}, "yyyy-MM-dd HH:mm:ss")), 1, "minute"))`

{[~]Report Generate Time} is the memory tag the user would put the date on. You could then execute the report from a value changed tag event script.
