scheduledTasks - how to Options
atremblay
Posted: Sunday, July 27, 2008 11:14:31 PM

Rank: Devotee

Joined: 2/23/2007
Posts: 92
Location: Simsbury, CT
I found out about Umbraco's scheduledTasks in Adam Perry's 6/24/2008 write-up of "Umbraco Gems, Hints and Tips".

I discovered that there is a node in the umbracoSettings.config file scheduledTasks that allows you to enter a URL and supposedly Umbraco will call this resource the interval you specify.

Here is the portion of my umbracoSettings.config file:

Code:

<scheduledTasks>
    <task log="true" alias="test60" interval="60" url="http://localhost/sample-page.aspx"/>
  </scheduledTasks>


The scheduledTask does not seem to be executing since I look in my IIS log and the Log Entries under Developer and there is nothing there to indicate the task has run.

Has anyone had luck getting these to work?Brick wall

thanks!

Al Tremblay
imayat12
Posted: Sunday, July 27, 2008 11:23:32 PM

Rank: Addict

Joined: 7/19/2006
Posts: 649
Location: Preston, UK
Al,

what version of umbraco are you using?

Regards

Ismail

Level 2 certified. If it aint broke dont fix.
atremblay
Posted: Sunday, July 27, 2008 11:30:46 PM

Rank: Devotee

Joined: 2/23/2007
Posts: 92
Location: Simsbury, CT
I am on version 3.0.3.

Al Tremblay
NeilG
Posted: Monday, July 28, 2008 9:39:45 AM

Rank: Aficionado

Joined: 12/15/2006
Posts: 113
I've had them working.
Is there anything in your "umbracoLog" table that might indicate a failure?


___________________________________________________________________________________

Neil
imayat12
Posted: Monday, July 28, 2008 10:58:49 AM

Rank: Addict

Joined: 7/19/2006
Posts: 649
Location: Preston, UK
Al,

The sample page sample-page.aspx is it being served up through umbraco or is it a stand alone page? If it is not served through umbraco but the page is sitting in umbraco site then has it been added as reserved url? What do you get when you hit the page directly any errors etc?

Regards

Ismail

Level 2 certified. If it aint broke dont fix.
SoerenS
Posted: Monday, July 28, 2008 11:58:37 AM

Rank: Fanatic

Joined: 7/25/2006
Posts: 424
Location: Silkeborg, Denmark
Also remember that IIS will unload low traffic sites from memory when they haven't been hit for 20 minutes (or thereabout), leading to the internal Umbraco Scheduler not being run.

Especially important if you're playing around with it on some sort of internal test site that doesn't get hit all the time.

/SoerenS

Brug for råd til hvordan du driver en god webshop? / Need advice on how to run an effective webshop?
atremblay
Posted: Monday, July 28, 2008 4:41:57 PM

Rank: Devotee

Joined: 2/23/2007
Posts: 92
Location: Simsbury, CT
Thanks for all the replies.

- Nothing in my umbracoLog to incicate failure.

- The sample page is an Umbraco served page. The page loads correctly in the browser. http://www.kiddercorp.com/sample-page.aspx

- This scheduledTask was setup on a site that is hit fairly often - probably every 10 mintues or so.

Adam Perry's 6/24/2008 write-up of "Umbraco Gems, Hints and Tips" did state that the scheduledTasks is referenced in the web.config. I am not sure if this was a typo since I am referencing it in my umbracoSettings.config.

Anyone have any ideas?

thanks!

Al Tremblay
SoerenS
Posted: Monday, July 28, 2008 5:45:50 PM

Rank: Fanatic

Joined: 7/25/2006
Posts: 424
Location: Silkeborg, Denmark
I use Umbraco's Scheduled Tasks on a couple of sites with no problems at all. I can even see log entries for them when I open up the umbracoLog table directly, but not in the Log package (but it's rather buggy anyway).

Two things you need to check:

1) Alias needs to be unique for each scheduled task that you run. It won't work if you fx. have multiple named test60.

2) Use the real domain name, not localhost. I haven't tested it, but I don't think Umbraco likes localhost.
Ie. in the example you posted you use url="http://localhost/sample-page.aspx". Change that to url="http://www.kiddercorp.com/sample-page.aspx".

Hope this helps you!

Best regards,
Soeren S.

Brug for råd til hvordan du driver en god webshop? / Need advice on how to run an effective webshop?
SoerenS
Posted: Monday, July 28, 2008 5:47:49 PM

Rank: Fanatic

Joined: 7/25/2006
Posts: 424
Location: Silkeborg, Denmark
Oh and here's a sample of what one of my log entries look like. Just so you know what to look for.

Code:
62758    0    -1    28-07-2008 17:14:19    ScheduledTask    Autopost1 has been called with response: False



Brug for råd til hvordan du driver en god webshop? / Need advice on how to run an effective webshop?
atremblay
Posted: Tuesday, July 29, 2008 2:49:37 AM

Rank: Devotee

Joined: 2/23/2007
Posts: 92
Location: Simsbury, CT
You are correct Soeren. The task has been running every minute since I scheduled it yesterday. For some reason it does not display in the UmbracoLog, but is in the database.

Thanks everyone for your assistance.


Al Tremblay
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.