Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hate launchd miss crontab



I was under the impression that cron does not run 'out of the box' under 10.4.x but that the act of modifying the crontab supplied with 10.4.x was enough to ensure that cron ran 'as normal'.

If this is *not* the case, can someone please comment?


 >Hi everyone,
 >
With our 10.3.9 image like everyone I used crontab to scheadule scripts
to run.  Now with 10.4.3 I tried putting this same info back into
/etc/crontab and crontab -e and they still wont run.

I checked the daily.out script and it hasn't run since May of 05, which
was when I last worked on our 10.4.x image waiting for a bug to be fixed
which came with 10.4.3.


I pulled the info back out of the crontabs and just let the machine sit
and let the launchd run the default daily script and it never ran it.  So
its not working now.  Any ideas on why daily isn't running now?

Crontab:
# /etc/crontab
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#
#minute hour    mday    month   wday    who     command
#
#*/5    *       *       *       *       root    /usr/libexec/atrun
#
# Run daily/weekly/monthly jobs.
52      22      *       *       *       root    periodic daily
54      22      *       *       6       root    periodic weekly
56      22      1       *       *       root    periodic monthly
57      22      1       *       *       root    /sbin/startRemoveCaches
58      22      1       *       *       root    /sbin/startRemoveMCXCaches
00      23      *       *       *       root    /sbin/startshutdown

Thanks,

Dan Ball

Dan,

Make sure that cron is loaded into launchd.  My backup server runs about
50-60 individual processes, and I don't want to create that many launchd
configs, so I'm using the crontab with very good results.

To check if launchd knows about cron:
sudo launchctl list

You want to see com.vix.cron in the list.  If it's not, then you need to
load it:
sudo launchctl load /System/Library/LaunchDaemons/com.vix.cron.plist

If your machine complains about the com.vix.cron.plist file (like it's not
there or anything), this is what mine looks like (the default version):
<?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.vix.cron</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/sbin/cron</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>WatchPaths</key>
        <array>
                <string>/etc/crontab</string>
        </array>
        <key>QueueDirectories</key>
        <array>
                <string>/var/cron/tabs</string>
        </array>
</dict>
</plist>


To then start it: sudo launchctl start com.vix.cron

Maybe this will help.  I've never had to do this, but maybe my setup is
different than yours.

Sean Kaiser

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Client-management mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/client-management/email@hidden

This email sent to email@hidden


--
*********************************************************************
David Riddle, Senior Micro Officer (Macintosh Systems)
Goldsmiths College London
New Cross, London SE14 6NW, UK

LIST owner, MAC-SUPPORTERS, MACOS-X, M-L-C, ITSUPPORT, WEB-SUPPORT, UK-SCHOOLS

Tel: 020 7919 7546 Fax: 020 7919 7556
Mobile: 07966 472340 e-Mail: email@hidden
*********************************************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Client-management mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/client-management/email@hidden

This email sent to email@hidden
References: 
 >Re: Hate launchd miss crontab (From: "Sean M. Kaiser" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.