Schedule code to run that doesn't require an aspx page
Hi:
Is there a way in Umbraco to schedule a piece of code to run say every 5 minutes with out requiring the specific piece of code to be embedded in a page.
The schedule option in the config file seems to require an aspx page/code behind.
Would'nt it be possible to simply point the scheduler to a service? (.asmx) file? Or does that count as a page in this context? (I'm not really a .NET dev :)).
I'm always creating a Generic Handler (.ashx) and set the scheduler to call that.
Jan's suggestion works aswell, but I think a generic handler makes a bit more sense since it will always be a 1-1 task that needs to be performed from the scheduler whereas a webservice can have several methods. I'm not saying that a webservice is wrong, though :-) It works just aswell.
Often times, I'm just using the generic handler as a higher level of abstraction and move all logic to a lower level in the architecture, depending on the size of the project/website.
Don't know if the above makes any sense, if not, please let me know and I'll try to elaborate :-)
Schedule code to run that doesn't require an aspx page
Hi:
Is there a way in Umbraco to schedule a piece of code to run say every 5 minutes with out requiring the specific piece of code to be embedded in a page.
The schedule option in the config file seems to require an aspx page/code behind.
Any help apreciated.
Cheers
Sean.
Not at the moment. But there are plans (?) to refactor the scheduler, and that could be a valuable addition to it.
Hi:
Are there any UTrack issues pertaining to this?
Cheers
Sean.
Would'nt it be possible to simply point the scheduler to a service? (.asmx) file? Or does that count as a page in this context? (I'm not really a .NET dev :)).
/Jan
I'm always creating a Generic Handler (.ashx) and set the scheduler to call that.
Jan's suggestion works aswell, but I think a generic handler makes a bit more sense since it will always be a 1-1 task that needs to be performed from the scheduler whereas a webservice can have several methods. I'm not saying that a webservice is wrong, though :-) It works just aswell.
Often times, I'm just using the generic handler as a higher level of abstraction and move all logic to a lower level in the architecture, depending on the size of the project/website.
Don't know if the above makes any sense, if not, please let me know and I'll try to elaborate :-)
All the best,
Bo
Oh yes, .ashx file was also what I meant in my previous post #h5is ;-)
/Jan
is working on a reply...