Subject: cron under 10.4
From: Jacco Rens
Date: 2005-04-29 22:56:45
Hi List members,
After installing 10.4 today, I found that '/etc/crontab' isn't used
anymore. Can anyone explain how I add an crontask that uses launchd?
I want an 5 minute repeating task that updates my cacti database with
snmp data. The command that does that is:
/usr/bin/php /patch/to/poller.php
Thanks for your insight,
Jacco
Netherlands.
_______________________________________________
Darwinports mailing list
<email removed>
http://www.opendarwin.org/mailman/listinfo/darwinports
From: Anthony M. Agelastos
Date: 2005-04-30 15:48:14
Having read this and read about launchd, do DarwinPortsStartup and
anacron fully work with 10.4? I would test it myself if I had 10.4 (it
is on its way).
By the way, thanks for the hard work in putting out a quality 1.0
release.
On Apr 29, 2005, at 4:56 PM, Jacco Rens wrote:
> Hi List members,
>
> After installing 10.4 today, I found that '/etc/crontab' isn't used
> anymore. Can anyone explain how I add an crontask that uses launchd? I
> want an 5 minute repeating task that updates my cacti database with
> snmp data. The command that does that is:
>
> /usr/bin/php /patch/to/poller.php
>
> Thanks for your insight,
>
> Jacco
> Netherlands.
> _______________________________________________
> Darwinports mailing list
> <email removed>
> http://www.opendarwin.org/mailman/listinfo/darwinports
>
_______________________________________________
Darwinports mailing list
<email removed>
http://www.opendarwin.org/mailman/listinfo/darwinports
From: James Berry
Date: 2005-04-30 16:27:06
On Apr 29, 2005, at 1:56 PM, Jacco Rens wrote:
> Hi List members,
>
> After installing 10.4 today, I found that '/etc/crontab' isn't used
> anymore. Can anyone explain how I add an crontask that uses
> launchd? I want an 5 minute repeating task that updates my cacti
> database with snmp data. The command that does that is:
>
> /usr/bin/php /patch/to/poller.php
This is not the forum for general darwin support. Try the darwin
users list.
However, to answer your question, you can still use cron under 10.4.
First, verify that it's "loaded" into launchd:
% sudo launchctl list
launchdtest
tomcat5
com.apple.KernelEventAgent
com.apple.mDNSResponder
com.apple.nibindd
com.apple.periodic-daily
com.apple.periodic-monthly
com.apple.periodic-weekly
com.apple.portmap
com.apple.syslogd
com.vix.cron
org.postfix.master
org.xinetd.xinetd
There it is: com.vix.cron
If it's not there, do:
sudo launchdctl load -w /System/Library/LaunchDaemons/
com.vix.cron.plist
to load and enable it.
The launchd plist for cron at /System/Library/LaunchDaemons/
com.vix.cron.plist specifies that cron is run once at startup, and
rerun if any of its files changes:
%cat /System/Library/LaunchDaemons/com.vix.cron.plist
Label
com.vix.cron
ProgramArguments
/usr/sbin/cron
RunAtLoad
WatchPaths
/etc/crontab
QueueDirectories
/var/cron/tabs
_______________________________________________
Darwinports mailing list
<email removed>
http://www.opendarwin.org/mailman/listinfo/darwinports
From: Jordan K. Hubbard
Date: 2005-04-30 20:33:08
In reality, it's all a lot easier than this. Simply create an /etc/
crontab file with an entry in it, or use the crontab command to
create a user crontab, and launchd will auto-start cron for you. You
don't need to do any of the below.
- Jordan
On Apr 30, 2005, at 7:27 AM, James Berry wrote:
>
> On Apr 29, 2005, at 1:56 PM, Jacco Rens wrote:
>
>
>> Hi List members,
>>
>> After installing 10.4 today, I found that '/etc/crontab' isn't
>> used anymore. Can anyone explain how I add an crontask that uses
>> launchd? I want an 5 minute repeating task that updates my cacti
>> database with snmp data. The command that does that is:
>>
>> /usr/bin/php /patch/to/poller.php
>>
>
> This is not the forum for general darwin support. Try the darwin
> users list.
>
> However, to answer your question, you can still use cron under 10.4.
>
> First, verify that it's "loaded" into launchd:
>
> % sudo launchctl list
> launchdtest
> tomcat5
> com.apple.KernelEventAgent
> com.apple.mDNSResponder
> com.apple.nibindd
> com.apple.periodic-daily
> com.apple.periodic-monthly
> com.apple.periodic-weekly
> com.apple.portmap
> com.apple.syslogd
> com.vix.cron
> org.postfix.master
> org.xinetd.xinetd
>
> There it is: com.vix.cron
>
> If it's not there, do:
>
> sudo launchdctl load -w /System/Library/LaunchDaemons/
> com.vix.cron.plist
>
> to load and enable it.
>
> The launchd plist for cron at /System/Library/LaunchDaemons/
> com.vix.cron.plist specifies that cron is run once at startup, and
> rerun if any of its files changes:
>
> %cat /System/Library/LaunchDaemons/com.vix.cron.plist
>
>
> "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
>
>
> Label
> com.vix.cron
> ProgramArguments
>
> /usr/sbin/cron
>
> RunAtLoad
>
> WatchPaths
>
> /etc/crontab
>
> QueueDirectories
>
> /var/cron/tabs
>
>
>
>
> _______________________________________________
> Darwinports mailing list
> <email removed>
> http://www.opendarwin.org/mailman/listinfo/darwinports
>
_______________________________________________
Darwinports mailing list
<email removed>
http://www.opendarwin.org/mailman/listinfo/darwinports
From: James Berry
Date: 2005-04-30 20:46:22
On Apr 30, 2005, at 11:33 AM, Jordan K. Hubbard wrote:
> In reality, it's all a lot easier than this. Simply create an /etc/
> crontab file with an entry in it, or use the crontab command to
> create a user crontab, and launchd will auto-start cron for you.
> You don't need to do any of the below.
I didn't mean to imply any of that was "necessary" ;) I agree that
it shouldn't be. I was just trying to illustrate how it works, and
how it should be running, and what to do if it wasn't, because it
didn't seem to be working for Jacco. But maybe I hid the tree in the
forest ;)
-jdb
_______________________________________________
Darwinports mailing list
<email removed>
http://www.opendarwin.org/mailman/listinfo/darwinports
From: Jacco Rens
Date: 2005-04-30 21:21:48
--===============0817453507==
Content-Type: multipart/alternative; boundary=Apple-Mail-1--857245026
--Apple-Mail-1--857245026
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
On 30-apr-2005, at 20:46, James Berry wrote:
> because it didn't seem to be working for Jacco. But maybe I hid the
> tree in the forest ;)
I did, actually. In the early days (10.2, 10.3) I was always hacking
the '/etc/crontab' with pico. But I've seen the light! On e should
use the crontab command ;-)
Still kind of magic, this launchd business.
Thanks for your time guys!
- jacco
--Apple-Mail-1--857245026
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
charset=US-ASCII
On 30-apr-2005, at 20:46, James Berry wrote:because it didn't seem to be working \
for Jacco. But maybe I hid the tree in the forest ;) I did, actually. In the \
early days (10.2, 10.3) I was always hacking the '/etc/crontab' with pico. But \
I've seen the light! On e should use the crontab command ;-)Still kind of magic, \
this launchd business.Thanks for your time guys!- jacco
--Apple-Mail-1--857245026--
--===============0817453507==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Darwinports mailing list
<email removed>
http://www.opendarwin.org/mailman/listinfo/darwinports
--===============0817453507==--