Index: [Article Count Order] [Thread]

Date:  Thu, 04 Jan 2007 02:23:05 +0100
From:  Kristian Eklund <kristian.eklund (at mark) monostar.net>
Subject:  [coba-e:08472] Re: Cron
To:  coba-e (at mark) bluequartz.org
Message-Id:  <459C56F9.4020505 (at mark) monostar.net>
In-Reply-To:  <200701031732430109.5405F9F4 (at mark) mail.loosle.com>
References:  <006d01c72e9d$ad011160$3701a8c0 (at mark) lapxp> <459B9E1B.4080008 (at mark) dogsbody.org> <200701031732430109.5405F9F4 (at mark) mail.loosle.com>
X-Mail-Count: 08472

Hi Tony,

> I need to add a php script to the cron job.
> 
> When I enter crontab -e to edit it, I get a list of ~
> 
> How do I add a cron job?

I have an example here of a PHP script that is run every half an hour;
30 * * * * run-parts /etc/cleanup.sh >/dev/null 2>&1
59 * * * * run-parts /etc/cleanup.sh >/dev/null 2>&1

minute 30 and 59, /etc/cleanup.sh is run and it sends logdata to 
/dev/null and I get no mail that the script was run.

/etc/cleanup looks like this:

#!/bin/sh
php /home/sites/www.blablabla.com/web/clean.php >/dev/null 2>&1

---

This worked just fine when I used it.

/Kristian