ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Learning the Terminal in Jaguar, Part 1
Subject:   crontab moved
Date:   2007-08-28 17:44:40
From:   Jonny81
Response to: crontab moved

Rupert,


type the following and it should get you there (I'm using OSX 10.4.10 so hopefully it is the same!)


cd /system/library/launchdaemons


This will bring you to the correct directory. If you do an ls you can see the list of files, the three which are important are:


com.apple.periodic-daily.plist
com.apple.periodic-monthly.plist
com.apple.periodic-weekly.plist


Type:


sudo cp com.apple.periodic-daily.plist com.apple.periodic-daily.plist.bak
sudo cp com.apple.periodic-monthly.plist com.apple.periodic-monthly.plist.bak
sudo cp com.apple.periodic-weekly.plist com.apple.periodic-weekly.plist.bak


in order to make backups of the files. If you look at the contents of the daily file through cat:


cat com.apple.periodic-daily.plist


you should get something like this:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apple.periodic-daily</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/periodic</string>
<string>daily</string>
</array>
<key>LowPriorityIO</key>
<true/>
<key>Nice</key>
<integer>1</integer>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>3</integer>
<key>Minute</key>
<integer>15</integer>
</dict>
</dict>
</plist>


We find out that the files are now in XML (I have no clue why). Anyway, there are two KEY tags, one is Hour and the other is Minute. Under each of these is the associated INTEGER tag (which in this case is 3 for HOUR and 15 for MINUTE). I changed my HOUR integer tag from 3 to 20 (so it would run at 8:15pm). Haven't had any problems.


The other two files should be the same (with perhaps slightly different times).


Hope this helps and sorry if it isnt the same in OSX 10.4.8. Just make sure to backup your files!


1 to 1 of 1
  1. crontab moved
    2007-08-28 17:55:55  Jonny81 [View]

1 to 1 of 1