I have a java script what’s run by the Automator. The script calculates a time of its own next launch.
How can I run the script in each scheduled time?
I use the at
command for dynamic scheduling like this.
If you check the man
page, you’ll see the following:
IMPLEMENTATION NOTES
Note that at is implemented through the launchd(8) daemon periodically
invoking atrun(8), which is disabled by default. See atrun(8) for
information about enabling atrun.
When you check the atrun
page, you get the following details on how to enable your Mac to run scheduled instructions stet by at
.
DESCRIPTION
The atrun utility runs commands queued by at(1). It is invoked
periodically by launchd(8) as specified in the com.apple.atrun.plist
property list. By default the property list contains the Disabled key
set to true, so atrun is never invoked.
Execute the following command as root to enable atrun:
launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist
For running Automator workflows from the command line…
Hope that helps.
Thank you so much!
I’ll try to figure out