Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Completely baffled as to why Cron job is not working
- Date: Thu, 01 Nov 2007 11:09:22 +0900
- From: Darren Cook <darren@example.com>
- Subject: Re: [tlug] Completely baffled as to why Cron job is not working
- References: <47284ED9.1020106@autotelic.com> <47292C00.5050405@samsara.bebear.net>
- User-agent: Thunderbird 1.5.0.12 (X11/20070530)
>> Okay, so obviously the first assumption is that the script is probably >> not running the command correctly. So I try running the script from >> the command line, and it works perfectly. > ... > Because the environment cron is running it in is different. ... My favourite way to get around this is to put something like this in your crontab: 16 8 * * * /bin/bash -c "cd /path/to/script/;php my_script.php" Running bash seems to bring in all the files that set up the environment. If that is not enough then try also adding -l, which will make it a login shell. Darren
- Follow-Ups:
- Re: [tlug] Completely baffled as to why Cron job is not working [SOLVED]
- From: Dave M G
- Re: [tlug] Completely baffled as to why Cron job is not working
- From: Keith Bawden
- References:
- [tlug] Completely baffled as to why Cron job is not working
- From: Dave M G
- Re: [tlug] Completely baffled as to why Cron job is not working
- From: emiddleton@example.com
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Completely baffled as to why Cron job is not working
- Next by Date: RE: [tlug] Arial ... MS ...: Embrace Free Fonts
- Previous by thread: Re: [tlug] Completely baffled as to why Cron job is not working
- Next by thread: Re: [tlug] Completely baffled as to why Cron job is not working [SOLVED]
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links