[Techtalk] A PHP script in a crontab.

David Merrill david at lupercalia.net
Sat Jan 29 19:54:55 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sue Stones wrote:
| Mary wrote:
|
|> On Sat, Jan 29, 2005, Mary wrote:
|>
|>> If you could post a 5 or 10 line PHP script that ALSO doesn't seem to
|>> work, we might be able to give feedback about why that might or might
|>> not work.
|>
|>
|>
|> Oh yeah, it's also useful to say what it should look like when if it did
|> work, something like "if this worked, I'd expect to get a mail saying
|> BLAH, or I'd see that file BLAH was renamed to BLAH.txt" -- as I've
|> discovered recently at work it's very hard to tell if other people's
|> code is actually giving the effect they want, even if it seems to be
|> working!
|>
|
| Sorry I must have forgotten to say that the script works when I run it
| manually, its just the running it from the CRON tab that doesn't work.
| (thats why I didn't post any code).

You said you're running the script directly from a crontab, but I'll
mention this anyway just in case.

If you're using run-parts to execute the script, be aware that it only
recognizes filenames containing letters, digits, underscores and
hyphens. NO PERIODS. So a script named "script.php" wouldn't run. I once
spent a lot of time trying to figure out why a cron job wouldn't run,
and this was my problem.

- --
David Merrill
http://www.lupercalia.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFB+09fWC4Sq/MWsY0RAp8AAKCI47u+9irA91Setk3SLZCKpaxHNQCdHGiD
c4bjbQMvkYeKWlb+/bs8fZ8=
=ehfY
-----END PGP SIGNATURE-----


More information about the Techtalk mailing list