Hi,
I have an issue with my Mac sleeping after the set period when there is a background process running - currently set to 15 mins. While this process is running, which could be anything from 20 mins to a couple of hours, I wish to keep the Mac awake.
There is a log file which is regularly updated while the process is running so I'm thinking if there is a way of checking the timestamp of this log file on a regular basis. If it has changed for example in the last 10 mins, perform some action that will keep the Mac awake e.g. invoke caffeine or mimic a cursor movement or similar?
Does anyone have any thoughts or ideas on how to achieve this? I'm new to this kind of thing but reasonably tech savvy and happy to learn.
I have an issue with my Mac sleeping after the set period when there is a background process running - currently set to 15 mins. While this process is running, which could be anything from 20 mins to a couple of hours, I wish to keep the Mac awake.
There is a log file which is regularly updated while the process is running so I'm thinking if there is a way of checking the timestamp of this log file on a regular basis. If it has changed for example in the last 10 mins, perform some action that will keep the Mac awake e.g. invoke caffeine or mimic a cursor movement or similar?
Does anyone have any thoughts or ideas on how to achieve this? I'm new to this kind of thing but reasonably tech savvy and happy to learn.