I'm looking for any advice people might have on running a Windows executable process in the background of Orchard.
The process needs to be triggered from an Orchard module (but any experience of doing this in any .NET context would be really helpful).
I'm looking at either running an IBackgroundTask or IScheduledTask to do the work of checking the database and then triggering the executable. It'll be a long-running process so really I want to fire it up in a separate thread and allow the Orchard thread
to close. But then I still need to pick the reins back up when the process finishes (and capture output to determine success), and possibly fire up another one. Basically there's a queue of large data files that need processing one by one with a command line
tool; encoding videos into different formats, at the moment I'm looking at VideoLan's x264.exe for this. So I also need to limit the amount of CPU time the process uses (and perhaps limit it to a single CPU ... I of course have full admin rights on the server
so full trust is not an issue),
I've got some ideas about how to try to set this up, but there are probably multiple ways I could tackle this and I'm a little unsure how best to proceed. I'm just wondering if anyone has any suggestions or advice for this scenario?