|
|
 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? thanks!
Al Tremblay
|
|
 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.
|
|
 Rank: Devotee
Joined: 2/23/2007 Posts: 92 Location: Simsbury, CT
|
I am on version 3.0.3.
Al Tremblay
|
|
 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
|
|
 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.
|
|
 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?
|
|
 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
|
|
 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?
|
|
 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?
|
|
 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
|
|
|
Guest |