Created
July 3, 2018 13:01
-
-
Save jraps20/517416955cb58d5a6f3513cae451a808 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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