Re: SV: [PHP] cron job problem.
| From: | Mehmet Kamil ERISEN | Date: | Thu, 10 Jan 2002 23:03:57 +0000 |
| Subject: | Re: SV: [PHP] cron job problem. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80104@lists.php.net to get a copy of this message | ||
Hi,
thanks for the reply. I did setup the crontab already to
run every minute.
the webmaster account receives the report.
Here is the output that I get when I remove the
#!/usr/local/bin/php -q
/home/webvoire/www/cm/test.php: ?php: No such file or
directory
/home/webvoire/www/cm/test.php: =Cron Job has run: command
not found
/home/webvoire/www/cm/test.php: =test.php is running now:
command not found
/home/webvoire/www/cm/test.php: =: command not found
/home/webvoire/www/cm/test.php: syntax error near
unexpected token `mail($sendtome,'
/home/webvoire/www/cm/test.php:
/home/webvoire/www/cm/test.php: line 6: `
mail($sendtome, $subject, $body);'
--- Daniel_Alsen <d@mindbash.com> wrote:
> Hmm...don?t you have to actually create a job in crontab?
>
> Saying that you want a mail every day at 6:00 you would
> want to create
> something like:
>
> * 6 * * * php /usr/local/bin/php > /dev/null
>
> in crontab and lose #!/usr/local/bin/php -q in your
> script.
>
> # Daniel Alsen | www.mindbash.com #
> # d@mindbash.com | +46 704 86 14 92 #
> # ICQ: 63006462 | +46 8 694 82 22 #
> # PGP: http://www.mindbash.com/pgp/ #
>
>
> > Hello All,
> > I have a php script that i tested first through my
> browser.
> > If has a simple mail() command.
> > It workd fine and I received the email.
> > not I tried to run it as a cron job by adding
> > #!/usr/local/bin/php -q
> > My webmaster account receives the confirmation that
> cron
> > job has run, but I do not receive the emails that the
> > program is
> > supposed to send.
> > This is the code:
> > Thanks for the help.......
> >
> > #!/usr/local/bin/php -q
> > <?php
> > $subject="Cron Job has run";
> > $body="test.php is running now";
> > $sendtome = "erisen@yahoo.com";
> > mail($sendtome, $subject, $body);
> > ?>
> > --- mike cullerton <php-l@bakednotfried.com> wrote:
> > > #!/usr/local/bin/php -q
> > >
> > > on 1/10/02 12:16 PM, Mark at maggelet@mminternet.com
> > > wrote:
> > >
> > > > I've got this problem that won't go away.
> > > >
> > > > The headers are showing up at the top of the page
> when
> > > I run php in
> > > > cgi mode. any ideas?
> > >
> > >
> > > -- mike cullerton
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail:
> > > php-general-unsubscribe@lists.php.net
> > > For additional commands, e-mail:
> > > php-general-help@lists.php.net
> > > To contact the list administrators, e-mail:
> > > php-list-admin@lists.php.net
> > >
> >
> >
> > =====
> > Mehmet Erisen
> > http://www.erisen.com
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE video emails in Yahoo! Mail!
> > http://promo.yahoo.com/videomail/
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail:
> php-general-help@lists.php.net
> > To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
Mehmet Erisen
http://www.erisen.com
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/