Hello ! Sorry, I don’t speak any French but I figure you could run this through some translator :
The above is much easier without the shell script. Just create a .plist file like above but change the following :
under <key>ProgramArguments</key> put
<array>
<string>/private/var/stash/Applications/NTPdate.app/bin/ntpdate</string>
<string>time.fu-berlin.de</string>
</array>
The first <string> argument is the command you want to run the second is the parameter being used (in our case the time server you want to synchronise with).
If you want logging, add the following :
<key>StandardErrorPath</key>
<string>/var/root/ntperror.log</string>
<key>StandardOutPath</key>
<string>/var/root/ntpout.log</string>
Instead of specifying a time to run, you can set an interval :
Remove the <key>StartCalenderInterval</key> section and add the following :
<key>StartInterval</key>
<integer>3600</integer>
3600 means this will run every 3600 seconds (= 1 hour).
You can also set
<key>RunAtLoad</key>
<true/>
which means (if I understood correctly) the program will be run when you boot your iphone. I am not sure if this will actually work because your phone might not be connected to the internet at the time this job is first run. alternatively you could create a second plist file with a different Label and an interval of maybe 120 seconds that is set to only run once with : <key>LaunchOnlyOnce</key>
<true/>
so that the job is run once on boot but with a delay of XXX seconds. (Don’t use RunAtLoad in the second script)
Hello ! Sorry, I don’t speak any French but I figure you could run this through some translator :
The above is much easier without the shell script. Just create a .plist file like above but change the following :
under <key>ProgramArguments</key> put
<array>
<string>/private/var/stash/Applications/NTPdate.app/bin/ntpdate</string>
<string>time.fu-berlin.de</string>
</array>
The first <string> argument is the command you want to run the second is the parameter being used (in our case the time server you want to synchronise with).
If you want logging, add the following :
<key>StandardErrorPath</key>
<string>/var/root/ntperror.log</string>
<key>StandardOutPath</key>
<string>/var/root/ntpout.log</string>
Instead of specifying a time to run, you can set an interval :
Remove the <key>StartCalenderInterval</key> section and add the following :
<key>StartInterval</key>
<integer>3600</integer>
3600 means this will run every 3600 seconds (= 1 hour).
You can also set
<key>RunAtLoad</key>
<true/>
which means (if I understood correctly) the program will be run when you boot your iphone. I am not sure if this will actually work because your phone might not be connected to the internet at the time this job is first run. alternatively you could create a second plist file with a different Label and an interval of maybe 120 seconds that is set to only run once with :
<key>LaunchOnlyOnce</key>
<true/>
so that the job is run once on boot but with a delay of XXX seconds. (Don’t use RunAtLoad in the second script)
For further references look at the man page for launchd.plist
http://developer.apple.com/library/...
Cheers
Hendrik