Prerequisites
- A jailbroken iPhone - ssh access to the iPhone (you must install the OpenSSH package in Cydia, have an ssh client on your desktop machine and connect the two on the same network) - a text file editor iPhone (vim, available on Cydia for example) or software file transfer sftp (to edit files on your PC before uploading them on the phone).Installation
- Start by installing the software "ntpdate" available on Cydia (BigBoss source). This is a graphics software to manually adjust the clock on the iPhone but also installs the utility "ntpdate" (order online);
Connect to your iPhone via ssh as root (default password: alpine) and create the file / var / root / ReglageHorloge containing:
#!/bin/sh DIR=/private/var/stash/Applications/NTPdate.app/bin $DIR/ntpdate ntp1.jussieu.fr - If you want to keep track of updates, you can use the following version which retain historical adjustments to the clock in / var / root / ntpdate.log: #!/bin/sh DIR=/private/var/stash/Applications/NTPdate.app/bin $DIR/ntpdate ntp1.jussieu.fr >> /var/root/ntpdate.log 2>&1 - Make this script executable with the command:
chmod a+x /var/root/ReglageHorloge - At this point you can test its operation by typing the command line: /var/root/ReglageHorloge - Create the file / Library / LaunchDaemons / paul.courbis.horloge.plist containing: Label paul.courbis.horloge ProgramArguments /var/root/ReglageHorloge StartCalendarInterval Minute 0 Label paul.courbis.horloge ProgramArguments /var/root/ReglageHorloge StartCalendarInterval Minute 0 Label paul.courbis.horloge ProgramArguments /var/root/ReglageHorloge StartCalendarInterval Minute 0 Label paul.courbis.horloge ProgramArguments /var/root/ReglageHorloge StartCalendarInterval Minute 0 Label paul.courbis.horloge ProgramArguments /var/root/ReglageHorloge StartCalendarInterval Minute 0 Label paul.courbis.horloge ProgramArguments /var/root/ReglageHorloge StartCalendarInterval Minute 0 Label paul.courbis.horloge ProgramArguments /var/root/ReglageHorloge StartCalendarInterval Minute 0
WARNING: It appears that some browsers (like Chrome) sometimes display incorrectly above code by failing to display some tags. The text "paul.courbis.horloge" doir be framed by opening and closing tags of "string" is <string> paul.courbis.horloge </ string>.
Enable this scheduled task by the command (one line)
launchctl load /Library/LaunchDaemons/paul.courbis.horloge.plist
Now your iPhone will connect every hour (on the hour) to synchronize the clock with the ntp server Jussieu ....
You can change the frequency of this update by modifying the block: Minute 0 Minute 0
For example by replacing Hour 7 Minute 30 Hour 7 Minute 30 Hour 7 Minute 30 Hour 7 Minute 30
To connect every morning at 7:30 minutes.
Or Hour 7 Minute 30 Hour 19 Minute 30 Hour 7 Minute 30 Hour 19 Minute 30 Hour 7 Minute 30 Hour 19 Minute 30 Hour 7 Minute 30 Hour 19 Minute 30 Hour 7 Minute 30 Hour 19 Minute 30 Hour 7 Minute 30 Hour 19 Minute 30 Hour 7 Minute 30 Hour 19 Minute 30 Hour 7 Minute 30 Hour 19 Minute 30
Notes: - if modified plist file, run the command:
launchctl unload
/ Library / LaunchDaemons / paul.courbis.horloge.plist
before recharging the job by:
launchctl load /Library/LaunchDaemons/paul.courbis.horloge.plist
Depending on the version of IOS, the path to the command ntpdate may vary. The easiest way is to install the command locate (in the package "Find utilities") to update its database using the command updatedb then find the command ntpdate by typing locate ntpdate .