-
Notifications
You must be signed in to change notification settings - Fork 8
AutoConfiguration
Furkan Güngör edited this page Feb 6, 2022
·
3 revisions
Would you like to automatically register the cron jobs you created?
If your answer is yes, you can do this by following the steps below.
- Install
EasyCronJob.AutoConfigurerfrom Nuget - In the appsettings env file, define it as follows.
"CronJobs": {
"ConsoleCronJob": {
"CronExpression": "*/10 * * * * *",
"TimeZoneInfo": "Local",
"CronFormat": "IncludeSeconds"
},
"MyJob": {
"CronExpression": "*/2 * * * *",
"TimeZoneInfo": "Local",
"CronFormat": "Standard"
}
}- Add the following codes to
Startup.cs.
public void ConfigureServices(IServiceCollection services)
{
services.InitializeCronServices();
services.AutoConfigurer();
}- Sit back and sip your coffee.
Welcome to the EasyCronJob wiki!
Topics:
-
Getting Started
-
Integration
-
Other