# Add ScheduledTask programmatically Q&A

**URL:** <https://forum.litium.com/t/add-scheduledtask-programmatically-q-a/1770>\
**Category:** Questions\
**Tags:** litium-7\
**Created:** [November 13, 2020, 12:45pm UTC](https://forum.litium.com/t/add-scheduledtask-programmatically-q-a/1770 "2020-11-13T12:45:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![italo.cotta](https://avatars.discourse-cdn.com/v4/letter/i/7feea3/32.png) [@italo.cotta](https://forum.litium.com/u/italo.cotta)\
**Post date:** [November 13, 2020, 12:45pm UTC](https://forum.litium.com/t/add-scheduledtask-programmatically-q-a/1770/1 "2020-11-13T12:45:17Z")

</div>

Hello!  
Is it possible to add ScheduledTasks programmatically instead of through a tag in web.settings and if so how? I couldn’t find any information regarding this in the Litium .NET API or forums.

Thank you! 🙂

Litium version: 7.4.2

---

<div class="post-metadata">

**Author:** ![italo.cotta](https://avatars.discourse-cdn.com/v4/letter/i/7feea3/32.png) [@italo.cotta](https://forum.litium.com/u/italo.cotta)\
**Post date:** [November 13, 2020, 12:57pm UTC](https://forum.litium.com/t/add-scheduledtask-programmatically-q-a/1770/2 "2020-11-13T12:57:56Z")

</div>

I managed to find an answer to my question.  
It is doable by using this:

`Litium.Foundation.Solution.Instance.ScheduledTaskManager.RegisterScheduledTask(typeof(MyScheduledJob), TimeSpan.FromSeconds(1), TimeSpan.FromMinutes(1), null);`

where `MyScheduledJob` inherits from `ITask`.

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [December 11, 2020, 12:57pm UTC](https://forum.litium.com/t/add-scheduledtask-programmatically-q-a/1770/3 "2020-12-11T12:57:56Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
