 |
 |
how do you run the cron "cleaning" from terminal?
|
 |
|
 |
|
Grizzled Veteran
Join Date: Oct 2001
Location: Michigan
Status:
Offline
|
|
Just out of curiousity what would I have to type in from the terminal?
|
|
Pismo 400 | Powerbook 1.5 GHz | MacPro 2.66/6GB/7300GT
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2003
Location: 127.0.0.1
Status:
Offline
|
|
Daily: sudo /etc/daily
Weekly: sudo /etc/weekly
Monthly: sudo /etc/monthly
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Oct 2001
Location: Michigan
Status:
Offline
|
|
Thanks- does Mac os x do these commands during bootup? or do they just accumulate ?
|
|
Pismo 400 | Powerbook 1.5 GHz | MacPro 2.66/6GB/7300GT
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2003
Location: 127.0.0.1
Status:
Offline
|
|
Originally posted by tkmd:
Thanks- does Mac os x do these commands during bootup? or do they just accumulate ?
Nope. The daily script runs daily at 3:15 AM. The weekly script runs on Saturday at 4:30 AM. The monthly script runs on the 1st of the month at 5:30 AM.
Mac OS X inherits the original BSD subsystem code where it was assumed that these machines were never shut off. If the machine is off during those times the script will NOT run and databases do not get backed up.
You can either run these scripts through the terminal or through the GUI by using the freeware utility OnyX.
Here are the details about each script courtesy of OnyX help:
- Daily script: This script (daily) removes scratch and junk files (/tmp, /var/tmp, and /var/rwho), backs up the NetInfo database, checks subsystem status, and rotates the System.log file. By default, this script is executed every day at 3:15 AM, if the computer is turned on.
- Weekly script: This script (weekly) rebuilds the Locate and Whatis databases, restarts the Syslog process, and rotates the ftp.log, ipfw.log, lookupd.log, lpr.log, mail.log, and netinfo.log files, and the access_log and error_log files in the httpd folder. By default, this script is executed every Saturday at 4:30 AM, if the computer is turned on. This operation might take a few minutes; please be patient...
- Monthly script: This script (monthly) restarts the syslog daemon, runs login accounting, and rotates the wtmp.log and install.log files. By default, this script is executed the first day of every month at 5:30 AM, if the computer is turned on.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Oct 2001
Location: Michigan
Status:
Offline
|
|
I hate to bring an older topic back from the dead, but is anyone else having problems imputing these cron scripts in leopard - they worked beautifully in tiger...
|
|
Pismo 400 | Powerbook 1.5 GHz | MacPro 2.66/6GB/7300GT
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status:
Offline
|
|
Many internal components changed rather drastically in Leopard. What problem are you having?
|

"The natural progress of things is for liberty to yield and government to gain ground." TJ
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Oct 2001
Location: Michigan
Status:
Offline
|
|
I just wanted to run these commands in leopard via the command line - instead of downloading a separate program (onyx,machelper etc) and run these option through them...
|
|
Pismo 400 | Powerbook 1.5 GHz | MacPro 2.66/6GB/7300GT
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
The problem with cron which is solved by both anacron and launchd is that these jobs have to run at these absolute times. With anacron and launchd you can have tasks run after a certain interval of time. I'd look for any maintenance scripts to be moved to launchd in Leopard. Try a:
sudo launchctl list
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Mar 2004
Status:
Offline
|
|
Originally Posted by tkmd
I just wanted to run these commands in leopard via the command line - instead of downloading a separate program (onyx,machelper etc) and run these option through them...
The executable /usr/sbin/periodic is still there,
as are the task folders inside /etc/periodic. So...
sudo periodic daily weekly monthly
should still "work".
But besson3c is right. The best way to run them (imho)
is by giving launchd a kick in the pants:
sudo launchctl start com.apple.periodic-daily
sudo launchctl start com.apple.periodic-weekly
sudo launchctl start com.apple.periodic-monthly
As before, we can get an idea of how up-to-date they are with:
ls -lhrtT /var/{log/*.out,db/locate.database}
|
|
-HI-
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|