Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > HOWTO: Change the time periodic tasks are run.

HOWTO: Change the time periodic tasks are run.
Thread Tools
Ganesha
Senior User
Join Date: Jul 2002
Location: Arizona Wasteland
Status: Offline
Reply With Quote
Apr 30, 2005, 01:59 AM
 
Tiger no longer uses cron to run these jobs, instead Apple is using launchd. This requires a slightly different approach changing the timing of these tasks.

Mac OS X 10.4 has as changed the method by which the periodic system tasks periodic daily, weekly and monthly are called. You can no longer change their execution time by modifying the system crontab. If you wish to change the times these tasks run you will have to make changes to the follow files.

Code:
/System/Library/LaunchDaemons/com.apple.periodic-daily.plist /System/Library/LaunchDaemons/com.apple.periodic-weekly.plist /System/Library/LaunchDaemons/com.apple.periodic-monthly.plist
Since these files are owned by root, the easiest way to change them is with sudo and your favorite command line text editor.

Code:
(ex. sudo pico System/Library/LaunchDaemons/com.apple.periodic-daily.plist)
The relevant parts to change are.

Code:
<key>Hour</key> <integer>3</integer> <key>Minute</key> <integer>15</integer>
to whatever you like.

(Also submitted to maxosxhints)
     
t_hah
Mac Elite
Join Date: Dec 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
May 3, 2005, 01:30 PM
 
If I run the usual sudo periodic daily weekly monthly command in the Terminal, it still executes. Is there something I should be concerned about, or did that part of the process stay the same?
     
yaro
Forum Regular
Join Date: Nov 2001
Location: Fresno
Status: Offline
Reply With Quote
May 3, 2005, 01:52 PM
 
So where do I put my weekly cron scripts for execution?
( Last edited by yaro; May 3, 2005 at 02:13 PM. )
     
Ganesha  (op)
Senior User
Join Date: Jul 2002
Location: Arizona Wasteland
Status: Offline
Reply With Quote
May 3, 2005, 02:14 PM
 
Originally Posted by yaro
So where do I put my weekly cron scripts for excution?
You have two choices... Use cron like you always did. By default cron is off, but Apple's made it in Tiger that cron will turn if you have cron jobs the need running.

If you want to migrate them as a lunchd task put them...

Code:
~/Library/LaunchAgents Per-user agents provided by the user. /Library/LaunchAgents Per-user agents provided by the administrator.
...keep in mind the format for running launchd jobs is different then cron.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:14 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,