Copied to clipboard

Flag this post as spam?

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


  • M 33 posts 91 karma points
    Sep 24, 2013 @ 09:23
    M
    0

    Task Schedular sends more frequent emails than interval

    I am on umbraco v6.1.1. I've installed the package and changed upbracoSettings.config to run a task every 7 days (once a week). The url by itself executes fine and sends an email when run.

    <task log="true" alias="TaskName" interval="604800" url="url_to_the_task_on_server" />
    <task log="false" alias="TaskScheduler" interval="604800" url="main_site/umbraco/plugins/TaskScheduler/handlers/ScheduledTaskHandler.ashx />

    The problem is that with the above config change, the email is fired once every day, instead of once every week. 

    If I setup the same from CMS 'Task Scheduler' node (by creating a child node under Week and provide a url), the email isn't fired at all.

    Is there anything missing here? 

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Sep 24, 2013 @ 10:16
    Richard Soeteman
    0

    Hi,

    So what you did is use Taskscheduler and you've also added the url by itself in taskname? In UrlScheduler there is a check for the time but that's not in the normal Umbraco scheduled task(that you configured in the config file) which will propably execute after a .net application pool reset and therefore the task is executed every day. My suggestion is to remove the task from config and only execute it via TaskScheduler.

    Cheers,

    Richard

  • M 33 posts 91 karma points
    Sep 24, 2013 @ 11:31
    M
    0

    Hi Richard, thanks for prompt response.

    I tried executing the task just via TaskScheduler - but that doesn't run at all. When you say via TaskScheduler, you mean creating a node in developer and set the values for duration and url, right? Here's what I did. (This doesn't run for any duration, Hour, Day, Week)

     

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Sep 24, 2013 @ 12:44
    Richard Soeteman
    0

    Yes I mean that it could be that it doesn't run becvause the interval needs to be 1 minute.

  • M 33 posts 91 karma points
    Sep 24, 2013 @ 13:04
    M
    0

    Let me try that. Adding the following in config (1 miunte interval) and keeping the task url as shown in image above (1 hour interval).

    <tasklog="false"alias="TaskScheduler"interval="60"url="main_site/umbraco/plugins/TaskScheduler/handlers/ScheduledTaskHandler.ashx />
  • M 33 posts 91 karma points
    Sep 24, 2013 @ 14:36
    M
    0

    Hmm, no luck Richard. No email is fired - any more clue?

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Sep 24, 2013 @ 15:37
    Richard Soeteman
    0

    And the time is set correctly, as in within the same time period as the test?

  • M 33 posts 91 karma points
    Sep 25, 2013 @ 07:37
    M
    0

    Yes, time is set correctly. There're just two settings as per what you suggested. Let me repeat them here. 

    1) umbracoSettings.config

    <scheduledTasks>
    <task log="false" alias="TaskScheduler" interval="60" url="http://site_url/umbraco/plugins/TaskScheduler/handlers/ScheduledTaskHandler.ashx" />
    </scheduledTasks>

    2) Scheduled Task in Developer section :

     

    In this TEST case, I am checking if scheduled task runs every hour (right now it's not running at all). If this is successful, in the PRODUCTION case, I actually need it run once every week. Is that clear?

     

     

     

     

     

  • M 33 posts 91 karma points
    Sep 27, 2013 @ 14:57
    M
    0

    Hi Richard, any clue on this? A production release is waiting on this...thanks

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Sep 27, 2013 @ 15:06
    Richard Soeteman
    0

    Hi,

    No sorry not a clue. Maybe the site is not active at the moment it needs to run (app_pool shutdown) or similar. I've solved a similar issue in CMSImport that it still executes when the application is restarted. I should port that to task scheduler also but time is limited at the moment.

    Best,

    Richard

  • M 33 posts 91 karma points
    Oct 30, 2013 @ 07:38
    M
    0

    Thanks for all the help Richard. Deploying the task scheduler on a live website - that's active - works just fine. The test server doesn't provide an accurate test.

Please Sign in or register to post replies

Write your reply to:

Draft