Backup files created by a specific app only if its running

Posted:
Tue Sep 01, 2026 10:08 am
by DaveRI
I have an app that saves all my work in one file. I would like to back that file up (save a copy into a backup folder) every 30 mins but only if the app is running. I can only find rules that refer to creation DATE but not TIME and I can't figure out how to only run the rule if a particular application is running. Is there a way to have Hazel do this and if so can someone point me in the right direction please.
Re: Backup files created by a specific app only if its runni

Posted:
Wed Sep 02, 2026 10:08 am
by Mr_Noodle
You can probably do it via AppleScript and have that used as a rule condition in Hazel. If you search for AppleScript in the manual, it will show you how to have that script report back to your Hazel rule.
Re: Backup files created by a specific app only if its runni

Posted:
Thu Sep 17, 2026 11:30 pm
by AndrewLazarus
I am not great at AppleScript, but you can also use the condition about a shell script passing, and one version of the script would be
- Code: Select all
ps -cx | grep -qe "MyApplicationName"