Created
March 31, 2020 10:40
-
-
Save deksoke/08ee4c2d8b1e252932381fc840997224 to your computer and use it in GitHub Desktop.
Create Schedule Job Task in .Net C# Web Application
This file contains hidden or 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
public class Global : HttpApplication | |
{ | |
void Application_Start(object sender, EventArgs e) | |
{ | |
// Code that runs on application startup | |
RouteConfig.RegisterRoutes(RouteTable.Routes); | |
BundleConfig.RegisterBundles(BundleTable.Bundles); | |
TimeSpan intervalTimespan = TimeSpan.FromSeconds(30); | |
Task.Factory.StartNew(() => { | |
while (true) | |
{ | |
DoSomthing(); // JobSchedule_MovePlaceToOnboard("system"); | |
Task.Delay(intervalTimespan); | |
} | |
}); | |
} | |
private void DoSomthing() | |
{ | |
// | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment