HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/MBoogaard/oosting-horseriding.com/wwwroot/CMSPages/scheduler.aspx.cs
using System;
using System.Threading;

using CMS.Helpers;
using CMS.Base;
using CMS.Scheduler;
using CMS.SiteProvider;
using CMS.UIControls;

public partial class CMSPages_scheduler : CMSPage
{
    protected override void OnPreInit(EventArgs e)
    {
        base.OnPreInit(e);

        if (!DebugHelper.DebugScheduler)
        {
            DisableDebugging();
        }
    }


    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetNoStore();

        // Run the tasks
        SchedulingExecutorParameters schedulingParams = new SchedulingExecutorParameters() { SiteName = SiteContext.CurrentSiteName, ServerName = WebFarmHelper.ServerName };
        ThreadStart threadStartObj = new ThreadStart(schedulingParams.ExecuteScheduledTasks);
        // Create synchronous thread
        CMSThread schedulerThread = new CMSThread(threadStartObj, true, ThreadModeEnum.Sync);
        schedulerThread.Start();
    }
}