Copied to clipboard

Flag this post as spam?

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


  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 11:49
    Tony Kiernan
    0

    Schedule not working

    Tried scheduling a task (the task runs fine) and it will not trigger at all.  Is there some requirement mising from the documentation?

    V2.2 (according to the DLL)

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 12, 2012 @ 11:56
    Richard Soeteman
    0

    Hi Tony,

    check if the task is configured with the correct domainnam in the Umbracosettings.config file (can be found in the Config folder of Umbraco). In my case. Also check if the configured url can be accessed in the browser. The scheduled task in Umbraco requires that the site is running. I usually let pingdom or any other ping servers ping my site every hour to make sure its alive

    Hope that helps,.

    Richard

      <scheduledTasks>
        <!-- add tasks that should be called with an interval (seconds) -->
        <!--    <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
        <task log="false" alias="CMSImportScheduler" interval="60" url="http://umbracov47pro.local/umbraco/plugins/CMSImport/Handlers/ScheduleTaskHandler.ashx" />
      </scheduledTasks>
    
  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 12:34
    Tony Kiernan
    0

    OK, that was wrong. (Installed locally before being moved to the developemnt server.)  I've made the change (and restarted the site etc - overkill, I know) but still it has not run.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 12, 2012 @ 12:39
    Richard Soeteman
    0

    HI Tony,

    There can be a delay (depending on the umbraco version) of a few minutes. It's depending on the internal scheduler of Umbraco. Wait a few minutes (make sure the site is running) then it should run and in production use a tool like http://www.pingdom.com/ to ping your so the site will always be up.

    Thanks,

    Richard

  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 12:42
    Tony Kiernan
    0

    The site is running.

    I've changed the shchedule to hourly.  That'll give it the best part of 30 minutes to catch up with itself.  We'll see how it looks after noon.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 12, 2012 @ 13:00
    Richard Soeteman
    0

    Great Tony,

    In case that doesn't work I can create a small fix that includes a Timer that I will use for another package I'm working on. It's not tested in anger yet but I think it's more reliable than the current scheduler in Umbraco. And it's just a matter of dropping a dll (and deleting it if it doesn't work).

    Please let me know the results,

    Thanks,

    Richard

  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 14:07
    Tony Kiernan
    0

    That's now gone past two hour marks and still has not run

     

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 12, 2012 @ 14:10
    Richard Soeteman
    0

    Strange, nothing in the Dialog? and the site was running? Anything in the Umbracolog table?

  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 14:14
    Tony Kiernan
    0

    Nothing in the Umbracolog table (relvant to this).  The example you gave above, does have log set to false.

    Dialog? This?

    Scheduled task: My Daily
    Schedule: Every hour
    Next run time: 12 July 2012 12:00
     
    There are several people working on aspects of this site.  If it wasn't running I'd know about it
  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 12, 2012 @ 14:25
    Richard Soeteman
    0

    Did you rest IIS after changing the config file? It coulkd be that it's cached.

  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 14:39
    Tony Kiernan
    0

    I stopped the site. And rcycled the Application Pool.  Then restarted the site.  I felt that should be thorough enough. Is there something else you would suggest I could do?

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 12, 2012 @ 14:45
    Richard Soeteman
    0

    Nope that should work. If you want I can create a seperated DLL for you that contains a different timer, independed of the Umbraco one?

  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 14:47
    Tony Kiernan
    0

    If that's what it's going to take, then that's what it'll need to be

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 12, 2012 @ 14:50
    Richard Soeteman
    0

    I don't know normally it takes some time to execute the tasks but it will always run. But I will create the hotfix for you and let you know when it's done via this thread.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 12, 2012 @ 15:06
    Richard Soeteman
    0

    One more question.Did accessing the ashx handler directly also not execute? That is strange since that is looking for scheduled items and will process those directly.

  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 15:14
    Tony Kiernan
    0

    No.  Still nothing (or previously). 

    Do you think it's worth trying to reinstall?

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 12, 2012 @ 15:20
    Richard Soeteman
    0

    No that would not solve anything. But did you run http://yourdomain.com/umbraco/plugins/CMSImport/Handlers/ScheduleTaskHandler.ashx That should start the import process if you have something scheduled. 

    Ah there is one thing that comes to mind. Can you check the CMSImportScheduledItems table do you see a record with InProgress set to true? It could be that either you file is really big and it is still running or it could be set to true and then the Site was reset so it never finished. CMSImport will check this during because of some issues it had on clustered servers where various processes started and started emailing people.

    Hope that is the issue. Sorry for not thinking about this sooner. And it reminds me to add a warning to the dialog about this.

    Thanks,

     

     

  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 15:26
    Tony Kiernan
    0

    Yes, I opened the handler - a couple of times

    Funnily enough I was just looking in the database that table has:

    47    2    2012-07-12 14:10:00    NULL    1

    So, yes it sould seem to be inprogress.  This is a 500k csv with 30 lines.  I hope that's not really big,  So, should I clear this table?

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 12, 2012 @ 15:31
    Richard Soeteman
    0

    Set it to false and then call the handler directly first please just to ensure that some schedule task is executed then you can test it with the normal timer.

  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 15:53
    Tony Kiernan
    0

    Set to false.  Called the handler. It is now InProgress as true.  Has done for about ten minutes

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 12, 2012 @ 15:56
    Richard Soeteman
    0

    How many records does the file contain?

  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 16:01
    Tony Kiernan
    0

    29. If I run the process directly it takes 18 seconds

  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 16:13
    Tony Kiernan
    0

    Based on something you said before, I'm going to change the file location to the URL

  • Tony Kiernan 278 posts 341 karma points
    Jul 12, 2012 @ 16:53
    Tony Kiernan
    0

    No difference

  • Tony Kiernan 278 posts 341 karma points
    Jul 16, 2012 @ 13:30
    Tony Kiernan
    0

    After a lot of help (here and off board), seems you can't save the user to execute this as.  It defaults to the user with id 0.  I had deleted that user

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 16, 2012 @ 16:32
    Richard Soeteman
    0

    Thanks Tony for your patience and helping finding the bug. It's solved now and part of the 2.2.1 release(just added to our.umbraco.org).

    Thanks again,

    Richard

  • Alexander 8 posts 78 karma points c-trib
    Apr 26, 2018 @ 07:48
    Alexander
    0

    I wrote an exampel about it , check it out and maybe it will help.

    https://www.metamatrix.se/aktuellt/building-an-umbraco-schedule-task/

Please Sign in or register to post replies

Write your reply to:

Draft