Copied to clipboard

Flag this post as spam?

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


  • SideSam 13 posts 33 karma points
    Sep 06, 2011 @ 14:14
    SideSam
    0

    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? 

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 06, 2011 @ 15:12
    Dirk De Grave
    0

    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

  • SideSam 13 posts 33 karma points
    Sep 06, 2011 @ 16:37
    SideSam
    0

    Hi Dirk,

    Thanks for suggestion. I think I will go with your solution, I was not able to come up with better one :)

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Sep 06, 2011 @ 22:54
    Bo Damgaard Mortensen
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft