What's the difference between background and foreground commands?

  • administrators

    On Windows, background commands run in the context of the Windows service, so they run as the Local System account by default. The background commands can't display things in the GUI, 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 Windows service starts when you boot your PC, so you don't have to be logged in for the background commands to run.

    On Linux, background commands run as root, in the context of the triggercmdagent daemon.

    I haven't written a background service/daemon for Macs yet. Would that be helpful?

  • 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.

Log in to reply

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