Hi,
i need some help for two launchd agents.
first issue: the StartInterval is set to 30 minutes. But it runs always minutes before a whole hour, and it seems it cumulates minutes over time.
[code]<?xml version="1.0" encoding="UTF-8"?>
Label
com.myscript.agent
LowPriorityIO
Program
/usr/bin/osascript
ProgramArguments
osascript
~/Library/Scripts/myscript
StartCalendarInterval
Minute
30
StartInterval
1800
[/code]
second issue: i tried to watch a folder for changes, but the agent does nothing. Are whitespaces a problem? i tried also 'W\ folder' but nothing changes
Consider the difference: StartCalendarInterval is set to trigger the script every hour at h:30 StartInterval is set to trigger the script every 30 Minutes after the launchd agent has been loaded
issue#2
Space characters in paths don’t matter.
I recommend to specify always full paths starting with / and the watched path without trailing space
#1
i tried to write a agent who has to run a script task every half hour- related to my real clock hour time, not to an arbitrary stop-watch time. So i thought naively, to insert the ‘StartInterval’ key to get the whole hour, because two ‘StartCalendarInterval’ or two different time fractions (Minute) aren’t possible to set, or i’m wrong?
If things aren’t adjustable in one plist, i probably have to create two agents to run my script at two different clock time moments ?
#2
i tried with full paths as you suggested, but things refuse to work yet.Previousely, i used the ‘QueueDirectories’ but this key worked like crazy (don’t laugh now) :rolleyes:, because this one acted on every front window, and not only on the one path i had specified before. (my test script was a simple Finder script)
If you’re having issues with running the script for the watch folder agent maybe you could strip out all of the osascript stuff and just export your script into a .app bundle and then run the executable of the .app as the program arguments.