# Scheduled jobs not running

**URL:** <https://forum.litium.com/t/scheduled-jobs-not-running/3105>\
**Category:** Questions\
**Created:** [October 19, 2023, 4:35pm UTC](https://forum.litium.com/t/scheduled-jobs-not-running/3105 "2023-10-19T16:35:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ebad](https://avatars.discourse-cdn.com/v4/letter/e/7ea924/32.png) [@Ebad](https://forum.litium.com/u/Ebad)\
**Post date:** [October 19, 2023, 4:35pm UTC](https://forum.litium.com/t/scheduled-jobs-not-running/3105/1 "2023-10-19T16:35:21Z")

</div>

please tell me how can i run the scheduled jobs in litium 7.7 version and do they store in database and when they are executed if i am running locally?

---

<div class="post-metadata">

**Author:** ![Spotonkastebo](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/spotonkastebo/32/717_2.png) [@Spotonkastebo](https://forum.litium.com/u/Spotonkastebo)\
**Post date:** [October 20, 2023, 6:55am UTC](https://forum.litium.com/t/scheduled-jobs-not-running/3105/2 "2023-10-20T06:55:25Z")

</div>

Scheduled tasks are setup in web.config under tasksettings.  
If you don’t add the allowon attribute the scheduled task will run och every server that is running the application if you have the same configuration in web.config.

```auto
<taskSettings>
        <scheduledTasks>
          <scheduledTask type="Litium.Web.Sitemap.SiteMapScheduler, Litium.Web.Application" startTime="00:25" interval="24h"/>
          <scheduledTask type="Litium.Foundation.Log.ScheduledTasks.LogTruncateScheduler, Litium.Foundation" startTime="00:30" interval="2h"
            parameters="Trace=1, Debug=2, Info=10, Warn=25, Error=100, Fatal=-1, MaxCount=-1"/>
          <scheduledTask type="Litium.Foundation.Search.IndexOptimization, Litium.Foundation" startTime="02:00" interval="1d"/>
          <scheduledTask type="Litium.Foundation.Modules.ECommerce.Campaigns.CampaignDeactivator, Litium.Studio" startTime="00:05" interval="1d"/>
          <scheduledTask type="Litium.Foundation.Modules.ECommerce.Payments.PaymentStatusSynchronizer, Litium.Studio" startTime="00:00" interval="2h"/>
          <scheduledTask type="Litium.Foundation.Modules.ECommerce.Statistics.StatisticScheduler, Litium.Studio" startTime="00:20" interval="1d"
            parameters="MaxOrderAgeInMonths=6, OrderStates=1;2;3, RelationsLimit=25"/>
          <scheduledTask type="Litium.Foundation.Modules.ECommerce.Orders.OrderCleanupScheduler, Litium.Studio" startTime="00:40" interval="1d"/>

```

---

<div class="post-metadata">

**Author:** ![Ebad](https://avatars.discourse-cdn.com/v4/letter/e/7ea924/32.png) [@Ebad](https://forum.litium.com/u/Ebad)\
**Post date:** [October 20, 2023, 10:49am UTC](https://forum.litium.com/t/scheduled-jobs-not-running/3105/3 "2023-10-20T10:49:37Z")

</div>

How can I set the start time according to my timezone?

---

<div class="post-metadata">

**Author:** ![Spotonkastebo](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/spotonkastebo/32/717_2.png) [@Spotonkastebo](https://forum.litium.com/u/Spotonkastebo)\
**Post date:** [October 20, 2023, 11:04am UTC](https://forum.litium.com/t/scheduled-jobs-not-running/3105/4 "2023-10-20T11:04:48Z")

</div>

with the starttime attribute but if your timezone are different from the server timezone you just have to calculate what time to use in the config.

---

<div class="post-metadata">

**Author:** ![Ebad](https://avatars.discourse-cdn.com/v4/letter/e/7ea924/32.png) [@Ebad](https://forum.litium.com/u/Ebad)\
**Post date:** [October 20, 2023, 11:46am UTC](https://forum.litium.com/t/scheduled-jobs-not-running/3105/5 "2023-10-20T11:46:08Z")

</div>

Thanks!Can you please tell when they are run because I am not seeing any entry in database table Scheduler.ExecutionInfo so can you please tell when they are run after litium login or just when the application starts?

---

<div class="post-metadata">

**Author:** ![Spotonkastebo](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/spotonkastebo/32/717_2.png) [@Spotonkastebo](https://forum.litium.com/u/Spotonkastebo)\
**Post date:** [October 20, 2023, 12:25pm UTC](https://forum.litium.com/t/scheduled-jobs-not-running/3105/6 "2023-10-20T12:25:33Z")

</div>

They are scheduled according to your schedule when application starts. You can see that the schedule is registered in you litium log. if registration of scheduled failed you also see it.

To see that you schedules are running locally you can set a breakpoint of the job av debug.

It is also good to add logging to see that the task has started and stopped.

Log updates in the database I am not aware of how they work and when they are done.

---

<div class="post-metadata">

**Author:** ![Ebad](https://avatars.discourse-cdn.com/v4/letter/e/7ea924/32.png) [@Ebad](https://forum.litium.com/u/Ebad)\
**Post date:** [October 20, 2023, 2:45pm UTC](https://forum.litium.com/t/scheduled-jobs-not-running/3105/7 "2023-10-20T14:45:25Z")

</div>

The issue is that they reside under litium libraries so I cant debug the code.i dont know why the jobs are not running.Can i create my own test scheduled job?

---

<div class="post-metadata">

**Author:** ![Spotonkastebo](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/spotonkastebo/32/717_2.png) [@Spotonkastebo](https://forum.litium.com/u/Spotonkastebo)\
**Post date:** [October 23, 2023, 8:12am UTC](https://forum.litium.com/t/scheduled-jobs-not-running/3105/8 "2023-10-23T08:12:34Z")

</div>

Yes you can create your own jobs.

> **[Job Scheduler](https://docs.litium.com/platform/previous-versions/litium-7/architecture/job-scheduler)**
>
> Job Scheduler

---

<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:** [November 20, 2023, 8:12am UTC](https://forum.litium.com/t/scheduled-jobs-not-running/3105/9 "2023-11-20T08:12:50Z")

</div>

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