PDA

View Full Version : Cron Job Email



tnas
08-09-2004, 04:29 PM
Hi all,

I have my first CRON job running... with a slight problem.

Each time it runs, I get an email with the following...


--------- Original Message --------
From: "Cron Daemon" <root@www13.hostpc.com>
To: "diratslabs@www13.hostpc.com" <diratslabs@www13.hostpc.com>
Subject: Cron <diratslabs@www13> wget -b -o /home/mydomain/reminder_log.txt -O /home/mydomain/result.html http://www.mydomain.com/myphpscript.php
Date: 06/08/04 16:45


Continuing in background, pid 20456.




Is there a way to keep it from emailing me each time it runs? (it runs every 15 minutes, just a simple PHP script, 96 emails a day)

skidawg
08-10-2004, 02:26 PM
You could try adding
> /dev/null 2>&1
to the end of your cron command, so your command would look something like:
wget -b -o /home/mydomain/reminder_log.txt -O /home/mydomain/result.html http://www.mydomain.com/myphpscript.php > /dev/null 2>&1

I am not sure if that will work with the wget command, but it should be worth a try.

HTH,
Doug

tnas
08-10-2004, 02:41 PM
Thanks Doug. Worked fine.

I suppose anyone who is using CALOGIC calendar from the Instalatron and who wants the cron job to do reminders is going to need this info. It didn't take long for my email to get loaded with messages from the cron job.