Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sultanoflondon

macrumors 6502
Original poster
Dec 3, 2013
342
16
Hi all,

Is it possible to have an AppleScript automation code running in the background at all times that copies a folder into another folder? Would this significantly decrease battery life or CPU performance on a MacBook? It would be better if it is possible to set the AppleScript to start at a certain time (say Monday at 12:00:00), programme it to activate a point a few seconds after this, and then close down after the operation is complete (say at Monday 12:10:00).

How would I do this?

Thank you!
 
How would I do this?

You definitely don't need to have it running at all times. There's a Unix command named "watch" that will activate programs periodically, so set it to activate your program every 168 hours, and your program will run every week. I don't think it comes with standard macOS, but you can install it with Homebrew. Regarding writing the actual script, I've never actually used Apple Script, but if you want to make it as a bash program, all it is, is "cp -r 'path to first directory' 'path to second directory'"

Same might work in Apple Script, but definitely works for bash.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.