What's the difference between background and foreground commands?


  • administrators

    On Windows, background commands run in the context of the Background Service, so they run as the Local System account by default. The background commands can't display things on your screen, but because they run as the Local System account they have full access to your PC, so they can do things like reboot or stop/start other services. Also, the service starts when you boot your PC, so you don't have to be logged in for the background commands to run. Background commands won't even show up on the triggercmd.com site until you install the background service.

    On Linux it works similarly, but background commands run as root, in the context of the triggercmdagent daemon.

    Background commands don't work on Macs at this point because I haven't written a background service/daemon for Macs yet.



  • For the macOS application, I had set the trigger to run as background, without reading this first. It caused the trigger to not show up in the web interface until I set it to foreground.

    Would it be possible to remove the background option for the macOS app to avoid confusing people?


  • administrators

    @mnpg, that's a good idea. I'll add that to my todo list and try to do it soon.

    EDIT 1/5/2019: It's done in the latest version of the mac agent as of today. Now on a mac you can only select Foreground when you add commands.


Log in to reply
 

Looks like your connection to TRIGGERcmd Forum was lost, please wait while we try to reconnect.