Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using Quartz;
public class TestJob : SiteCronBase
{
protected override void Run(IJobExecutionContext context)
{
WriteLogLine(context, "Starting SiteCron job");
// core functionality lives here
// obtain databases with Factory.GetDatabase("master"); for example
for (var i = 1; i <= 10; i++)
{
WriteLogLine(context, $"Job step: {i}");
// sleep only for illustration purposes
Thread.Sleep(1000);
}
WriteLogLine(context, "End of SiteCron job");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment