Reputation: 2430
I everyone, I have created a azure web job that should run daily every 5 minutes between 06.00am and 10pm.
This is the CRON expression I have used 0 0/5 6-10 * * *
.
But for some reason the job run continuously, in the night too.
The app service under the web job runs has the Always on
set on On
.
Here the code of my job:
static void Main(string[] args)
{
MyEngine myEngine = new MyEngine();
myEngine.Run();
}
myEngine.Run()
run the following code:
Threading.Task.Run(() =>
{
this.processTaskActivities();
}, this.cancellationTokenSource.Token);
I do not think this is the correct approach to run a web job, but I cannot change it...
Why my webjob run alway?
Thank you
EDIT I let you see how the job is configured:
PS.: The CRON expression is just to text according the time. To understand if it stops and if it runs when necessary
Upvotes: 0
Views: 211