Hi Everyone, I have a scheduled task that I want to run every 5 minutes.
I added the url for my method in umbracoSettings.config and the necessary settings but scheduledTasks doesn't seem to be running.
I tried debugging it by calling the url from the browser and I do hit my break point.
I tried checking the logs but there are no errors being recorded. Is this a bug in umbraco? How can I know that the scheduled task is running?
<scheduledTasks>
<!-- add tasks that should be called with an interval (seconds) -->
<task log="true" alias="task1" interval="300" url="http://localhost:43203/umbraco/api/Integration/Init"/>
</scheduledTasks>
I'm using Umbraco 7.5.8
I never had trouble using scheduledTasks in other versions of Umbraco.
Hi Markus, yes, I've tried lowering the interval to 30 seconds but the scheduledTasks is still not hitting my endpoint.
And yes no error in the logs even in the IIS logs.
What I tried so far:
Assigned a local domain.
Tried calling a Url from a different website.
Created a different action controller with no custom attribute or logic inside. Just a break point. - Can be hit running in the browser but not from scheduledTasks.
One possibility is that the umbraco website might be configure with more secure environment which doesn't allow to execute the Taks Scheduler.
You can check the log "/App_Data/Logs" and you will see many error like below.
ERROR Umbraco.Web.Scheduling.ScheduledPublishing - [Thread 31] An error occurred with the scheduled publishing System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request) at System.Net.WebClient.UploadString(Uri address, String method, String data) at System.Net.WebClient.UploadString(String address, String data) at Umbraco.Web.Scheduling.ScheduledPublishing.Start(ApplicationContext appContext)
If you see error like above it mean there is some permission issue which is causing the Scheduler to perform the operation.
scheduledTasks not working
Hi Everyone, I have a scheduled task that I want to run every 5 minutes.
I added the url for my method in umbracoSettings.config and the necessary settings but scheduledTasks doesn't seem to be running.
I tried debugging it by calling the url from the browser and I do hit my break point.
I tried checking the logs but there are no errors being recorded. Is this a bug in umbraco? How can I know that the scheduled task is running?
I'm using Umbraco 7.5.8
I never had trouble using scheduledTasks in other versions of Umbraco.
Hi Romeo
Try to use "Url Task Scheduler For V7":
https://our.umbraco.org/projects/backoffice-extensions/url-task-scheduler-for-v7/
It's working fine for me
Thanks,
Alex
I didn't have trouble with scheduledTasks with Umbraco 7.2. Why is this not working now?
Hi!
If you lower the interval to debug, are you sure that there is no errors in the log?
I've seen some issues with the schedule tasks but that was back in v 7.4 or something.
Hi Markus, yes, I've tried lowering the interval to 30 seconds but the scheduledTasks is still not hitting my endpoint.
And yes no error in the logs even in the IIS logs.
What I tried so far:
So I think scheduledTasks is not running at all.
Hi Romeo,
One possibility is that the umbraco website might be configure with more secure environment which doesn't allow to execute the Taks Scheduler.
You can check the log "/App_Data/Logs" and you will see many error like below.
ERROR Umbraco.Web.Scheduling.ScheduledPublishing - [Thread 31] An error occurred with the scheduled publishing System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request) at System.Net.WebClient.UploadString(Uri address, String method, String data) at System.Net.WebClient.UploadString(String address, String data) at Umbraco.Web.Scheduling.ScheduledPublishing.Start(ApplicationContext appContext)
If you see error like above it mean there is some permission issue which is causing the Scheduler to perform the operation.
Its working now. if you look at umbracoServer table in the database you will see a column isMaster.
The scheduledTasks is only running on the master server.
Thanks everyone.
Hi Romeo.
I know this is an old post, but do you remember if you just changed IsMaster to true in the database or is there another workaround?
Hi Bo Jacobsen, Yes I just needed to turn isMaster to true for the main server. Are you having issue with scheduledTasks?
is working on a reply...