Application running independently and using some Umbraco functionality
Hello,
I am trying to build application that would run every x minutes checking properties on documents of specific type and if conditions are met then email is sent and document is unpublished/moved.
So far I think that using Linq to Umbraco would be nice solution. It would be great if I could create C# console application that uses Linq to Umbraco: selecting some published documents based on type, checking properties and if conditions are met then email is sent, document is unpublished and/or moved to different parent node.
I realize that Linq to Umbraco is not able to edit documents (unpublish/move). Maybe I could use something else for that.
My question would be how do I build .exe application that could do that? Or is there a different way of doing it?
How about creating a scheduled task (a aspx page - make sure umbraco ignores this page by adding it to the umbracoReservedUrls config in web.config) that'll run every x minutes and do whatever you need to do...
Advantage is that it's running inside the umbraco context, so you can use the document api to manipulate docs (unpublish/move)...
Keep in mind that Umbraco 4.7.0 comes with no umbraco.webservices.dll, so you'll have to download the sourcecode, compile the umbraco.webservices project, go to the bin folder and copy the compiled umbraco.webservices.dll to the bin folder in your Umbraco installation that contains the services.
Application running independently and using some Umbraco functionality
Hello,
I am trying to build application that would run every x minutes checking properties on documents of specific type and if conditions are met then email is sent and document is unpublished/moved.
So far I think that using Linq to Umbraco would be nice solution. It would be great if I could create C# console application that uses Linq to Umbraco: selecting some published documents based on type, checking properties and if conditions are met then email is sent, document is unpublished and/or moved to different parent node.
I realize that Linq to Umbraco is not able to edit documents (unpublish/move). Maybe I could use something else for that.
My question would be how do I build .exe application that could do that? Or is there a different way of doing it?
SideSam,
How about creating a scheduled task (a aspx page - make sure umbraco ignores this page by adding it to the umbracoReservedUrls config in web.config) that'll run every x minutes and do whatever you need to do...
Advantage is that it's running inside the umbraco context, so you can use the document api to manipulate docs (unpublish/move)...
Cheers,
/Dirk
Hi Dirk,
Thanks for suggestion. I think I will go with your solution, I was not able to come up with better one :)
Hi SideSam,
Another option might be to make calls to the DocumentService to access documents in Umbraco :-)
There's a list of services here, at the bottom of the page:
http://our.umbraco.org/wiki/reference/files-and-folders/files-in-the-config-folder/umbracosettingsconfig
- Bo
Edit:
Keep in mind that Umbraco 4.7.0 comes with no umbraco.webservices.dll, so you'll have to download the sourcecode, compile the umbraco.webservices project, go to the bin folder and copy the compiled umbraco.webservices.dll to the bin folder in your Umbraco installation that contains the services.
is working on a reply...