NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
DaMightyTom
Sep 13, 2009Aspirant
Crontab wont run my php jobs.
Im trying to run a crontab job on a PHP-file.
it looks like this
0 * * * * /usr/bin/php -q /c/killboard/cron/cron_import.php
the problem is that it wont run the job. If i go to the directory and do it manually (./cron_import.php) it works..
Anyone got any idea? Wrong path the the PhP exec?
it looks like this
0 * * * * /usr/bin/php -q /c/killboard/cron/cron_import.php
the problem is that it wont run the job. If i go to the directory and do it manually (./cron_import.php) it works..
Anyone got any idea? Wrong path the the PhP exec?
3 Replies
Replies have been turned off for this discussion
- chirpaLuminaryWorks for me, using this:
$ cat /etc/cron.d/nabaztag
# weekdays, wake at 8am, sleep at 11:30pm
10 8 * * mon-fri root /root/nabaztag.php wake &>/dev/null
30 23 * * mon-fri root /root/nabaztag.php sleep &>/dev/null
$ head -n2 /root/nabaztag.php
#!/usr/bin/php
<? - CharlesLaCourAspirantOne thing to keep in mind when having things run from cron is that the profile for the users is not normally run so any extra environment variables or additions to the path are not available. On my ReadyNAS PRO while running things through cron the only directories on the path are /usr/bin and /bin.
Are there any things in the php script that need to be executed that are found via the path or other environment variable? - beautiqueenAspirant
CharlesLaCour wrote: One thing to keep in mind when having things run from cron is that the profile for the users is not normally run so any extra environment variables or additions to the path are not available. On my ReadyNAS PRO while running things through cron the only directories on the path are /usr/bin and /bin.
Are there any things in the php script that need to be executed that are found via the path or other environment variable?
I have some issue in PHP Development in my project... please tell me where i get solutions??? :|
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!