Developer forum

Forum » Integration » Scheduled tasks are running when they shouldn't

Scheduled tasks are running when they shouldn't

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I have a bunch of scheduled tasks that I set to run One time, e.g. manually. However, in the log I see this every 5 minutes:

[7/15/2016 6:25:01 AM]:    Task 'ODE - Import accounts and addresses' with ID '3' execution is started
[7/15/2016 6:25:01 AM]:    Scheduled task 'ODE - Import accounts and addresses' with ID '3' minute property value should be greater then zero

The start and end time seem to be correctly configured (although they shouldn't be used because of the One Time configuration).

Why does DW try to run the task? Or is something else going on?

Thanks,

Imar


Replies

 
Morten Snedker
Reply

Hi Imar,

The Windows task scheduler that triggers the DW task scheduler usually runs every 5 minutes. So that would (kind of) explain the 5 minutes. Other than that: does the content of table ScheduledTask perhaps give a clue?

/Snedker

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Morten,

Yeah, the fact it logs something every 5 minutes makes sense. However, I thought it was odd that some tasks show up in the log even when disabled. I dug further and it seems that another site (the dveelopment environment) is makking task calls to production so maybe the calls are coming from there. Will look further.

Cheers,

Imar

 
Morten Snedker
Reply

Two sites calling production may potentially cause problems. But if they point to same solution with same database, disabled tasks should obviously not be triggered, no matter the amount of calls. That's why I am curious about the actual table content of ScheduledTask. The enabled/disabled property is just a boolean on the table, given i column "TaskEnabled". If it is set to 0 it should not run.

Let me know what you dig up.

/Snedker

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

I am still seeing this. The task is set up as shown in the attachment. Its "Repeat every" is set to Never. Yet the log shows this:

[9/4/2016 10:55:01 AM]:    Task 'ODE - Accounts' with ID '13' execution is started
[9/4/2016 10:55:02 AM]:    Scheduled task 'ODE - Accounts' with ID '13' minute property value should be greater then zero
[9/4/2016 11:00:00 AM]:    Task 'Repository task handler' with ID '1' execution is started
[9/4/2016 11:00:01 AM]:    Executing task 'Repository task handler' with ID '1' completed successfully.
[9/4/2016 11:00:01 AM]:    Task 'Calculate calculated fields' with ID '2' execution is started
[9/4/2016 11:00:01 AM]:    Executing task 'Calculate calculated fields' with ID '2' completed successfully.
[9/4/2016 11:00:02 AM]:    Task 'ODE - Accounts' with ID '13' execution is started
[9/4/2016 11:00:02 AM]:    Scheduled task 'ODE - Accounts' with ID '13' minute property value should be greater then zero

The task is active in the database (see Tasks.jpg). However, since its "Repeat every" is one time, it shouldn't be started and be in the log, right? Should TaskMinute be -1 instead of 0 when it's not scheduled?

Happy to provide more information and a URL if needed.

Imar

Task.jpg Tasks.jpg

 

You must be logged in to post in the forum