Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Romeo Cadaoas 33 posts 110 karma points
    Dec 13, 2017 @ 07:36
    Romeo Cadaoas
    0

    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?

      <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.

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Dec 13, 2017 @ 08:28
    Alex Skrypnyk
    0

    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

  • Romeo Cadaoas 33 posts 110 karma points
    Dec 13, 2017 @ 09:32
    Romeo Cadaoas
    0

    I didn't have trouble with scheduledTasks with Umbraco 7.2. Why is this not working now?

  • Markus Johansson 1911 posts 5757 karma points MVP c-trib
    Dec 13, 2017 @ 10:14
    Markus Johansson
    0

    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.

  • Romeo Cadaoas 33 posts 110 karma points
    Dec 13, 2017 @ 10:24
    Romeo Cadaoas
    0

    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:

    1. Assigned a local domain.
    2. Tried calling a Url from a different website.
    3. 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.

    So I think scheduledTasks is not running at all.

  • jigar 170 posts 233 karma points
    Dec 13, 2017 @ 10:49
    jigar
    0

    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.

  • Romeo Cadaoas 33 posts 110 karma points
    Dec 14, 2017 @ 05:01
    Romeo Cadaoas
    100

    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.

  • Bo Jacobsen 597 posts 2395 karma points
    Dec 04, 2019 @ 10:56
    Bo Jacobsen
    0

    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?

  • Romeo Cadaoas 33 posts 110 karma points
    Dec 06, 2019 @ 13:08
    Romeo Cadaoas
    0

    Hi Bo Jacobsen, Yes I just needed to turn isMaster to true for the main server. Are you having issue with scheduledTasks?

Please Sign in or register to post replies

Write your reply to:

Draft