I have an application that needs to be always working on a MacMini, I use crontab to start it but in High Sierra and Mojave, the app only works normally after logging on to the desktop. I need it to be working even without being logged in. It worked normally in Sierra ! I start the app in crontab with the command:

 @reboot su - user -c "sleep 20 ; application" 

and a script restart it if there's a problem! Any idea how I can fix this? TIA

  • I have no experience using cron on a Mac... Do you know about Services and Daemons using launchd? Jul 25, 2019 at 14:26
  • little knowledge , I come from linux , so I use what freebsd core of the Mac has to offer
    – Vilefort
    Jul 25, 2019 at 14:39
  • I feel you, on a *nix or linux distro cron or systemd (and variations thereof) would be my go-to tool, but on a Mac, I really think you want to use launchd. I recommend looking at the documentation on it, LaunchControl is a GUI app that I think gives you a good understanding of how launchd works in a broad sense. Jul 25, 2019 at 15:04
  • I agree, I'm seeing the launchd documentation right now, thank you.
    – Vilefort
    Jul 25, 2019 at 15:07
  • Just to check, the application doesn't need the window server running in order to function right? Jul 25, 2019 at 15:15


You must log in to answer this question.

Browse other questions tagged .