I'm currently having a bit of a nightmare as the company secretary's Mac has failed to run OneDrive since June. I use this to sync a Sharepoint document store that is effectively the company file server. The secretary has been working on a fairly significant number of files (and some pretty important ones regarding finance/invoices, recruitment, payroll, etc,) and did not noticed/mentioned that OneDrive hasn't been running.
Because of this problem, I've got ~500 files that I need to identify and work out how to sync/merge without over writing other people's changes... :/
I've effectively fixed her OneDrive for the time being -- it starts at startup and logs in and syncs as expected. I'm nervous, however, that OneDrive will stop again and we'll be back in the same boat, and I don't feel that asking her to keep an eye on it is a long term or a reliable solution.
What I was thinking of doing was to write a script that monitors for the OneDrive process and will fire an alert of some kind if it's not running. I am not a Mac expert however so I'm at a bit of a loss as how best to achieve that.
I guess AppleScript and a cron job is my best option. Can anyone advise if there is a better method, and can anyone help me getting started with AppleScript to detect a process and send an email warning if it's not detected?
EDIT : Process name is OneDrive