Command Line
- Open directory source\TaskSchedulerService in command line and execute dotnet run.
- Open https://localhost:5000/hangfire.
Visual Studio Code
- Open source directory in Visual Studio Code.
- Press F5.
Visual Studio
- Open source\TaskSchedulerService.sln in Visual Studio.
- Set TaskSchedulerService as startup project.
- Press F5.
Configure jobs in AppSettings.json.
"Jobs": [
{
"Id": "Job",
"Name": "Job",
"Url": "https://application.domain.com/job",
"Method": "POST",
"Cron": "* * * * *",
"Active": "true"
}
]
Examples
At every minute: * * * * *
At every hour: 0 * * * *
At every day: 0 0 * * *
At 00:00 on Sunday: 0 0 * * 0
At 00:00 on day-of-month 25: 0 0 25 * *
At 00:00 on every day-of-month from 25 through 31: 0 0 25-31 * *
At 08:30 on day-of-month 1 in June: 30 8 1 6 *
At 12:30 on Sunday and Saturday: 30 12 * * 0,6
At 18:20 on day-of-month 5 in every 6th month: 20 18 5 */6 *
At 20:00 on day-of-month 1: 0 20 1 * *
At 22:00 on every day-of-week from Monday through Friday: 0 22 * * 1-5
At every hour from 9 through 18: 0 9-18 * * *
At every hour from 12 through 14 on Saturday and Sunday: 0 12-14 * * 6,0
At every hour from 9 through 18 on every day-of-week from Monday through Friday: 0 9-18 * * 1-5