FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 05-06-2012, 02:26 PM
Thufir
 
Default cron.php

is the a particular "cron.php" which manages php cron jobs or similar?
Is there a particular syntax for PHP cron, something like:


1 * * * * /home/thufir/foo.php 1


or do you need a different syntax to make that run?



thanks,

Thufir


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-06-2012, 02:56 PM
Patrick Asselman
 
Default cron.php

On Sun, 6 May 2012 07:26:16 -0700, Thufir wrote:
is the a particular "cron.php" which manages php cron jobs or
similar?

Is there a particular syntax for PHP cron, something like:


1 * * * * /home/thufir/foo.php 1


or do you need a different syntax to make that run?



thanks,

Thufir


A .php file is not executable by itself. You may want to do
"/usr/bin/php -f /home/thufir/foo.php".
Best to try that manually at first, before putting it in the crontab,
just to see if it works. (If it is a php file that is supposed to be
accessed via the web server, it will probably not work.)


Best regards,
Patrick Asselman


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-06-2012, 03:53 PM
Paulo Sampaio
 
Default cron.php

You have two options:

- Use wget to access the page:
$ wget -O /dev/null http://localhost/my_php_script.php

- Use the php command line interface:

You will need the php-cli package installed, it's default.

$ php5 /var/www/my_php_script.php

There are other options, but the above can do the trick for you =]
Atenciosamente,

__
Paulo Sampaio
http://devio.us/~psampaio/




2012/5/6 Patrick Asselman <iceblink@seti.nl>

On Sun, 6 May 2012 07:26:16 -0700, Thufir wrote:


is the a particular "cron.php" which manages php cron jobs or similar?

Is there a particular syntax for PHP cron, something like:





1 * * * * */home/thufir/foo.php 1





or do you need a different syntax to make that run?







thanks,



Thufir




A .php file is not executable by itself. You may want to do "/usr/bin/php -f /home/thufir/foo.php".

Best to try that manually at first, before putting it in the crontab, just to see if it works. (If it is a php file that is supposed to be accessed via the web server, it will probably not work.)



Best regards,

Patrick Asselman





--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-06-2012, 03:55 PM
Paulo Sampaio
 
Default cron.php

I'm sorry, I've forgot to mentionthis. If you need an argument to be passed:

- With wget, pass the argument by GET:
$ wget -O /dev/null http://localhost/my_php_script.php?var=1


- With php-cli i don't know, will depend on your script.


Atenciosamente,
__
Paulo Sampaio

http://devio.us/~psampaio/



2012/5/6 Paulo Sampaio <paulo.vicente.neto@gmail.com>

You have two options:

- Use wget to access the page:
$ wget -O /dev/null http://localhost/my_php_script.php


- Use the php command line interface:

You will need the php-cli package installed, it's default.

$ php5 /var/www/my_php_script.php

There are other options, but the above can do the trick for you =]
Atenciosamente,


__
Paulo Sampaio
http://devio.us/~psampaio/





2012/5/6 Patrick Asselman <iceblink@seti.nl>


On Sun, 6 May 2012 07:26:16 -0700, Thufir wrote:


is the a particular "cron.php" which manages php cron jobs or similar?

Is there a particular syntax for PHP cron, something like:





1 * * * * */home/thufir/foo.php 1





or do you need a different syntax to make that run?







thanks,



Thufir




A .php file is not executable by itself. You may want to do "/usr/bin/php -f /home/thufir/foo.php".

Best to try that manually at first, before putting it in the crontab, just to see if it works. (If it is a php file that is supposed to be accessed via the web server, it will probably not work.)



Best regards,

Patrick Asselman





--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users





--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-11-2012, 08:43 AM
Thufir
 
Default cron.php

On Sun, 06 May 2012 16:56:59 +0200, Patrick Asselman wrote:

> On Sun, 6 May 2012 07:26:16 -0700, Thufir wrote:
>> is the a particular "cron.php" which manages php cron jobs or similar?
>> Is there a particular syntax for PHP cron, something like:
>>
>>
>> 1 * * * * /home/thufir/foo.php 1
>>
>>
>> or do you need a different syntax to make that run?
>>
>>
>>
>> thanks,
>>
>> Thufir
>
> A .php file is not executable by itself. You may want to do
> "/usr/bin/php -f /home/thufir/foo.php". Best to try that manually at
> first, before putting it in the crontab, just to see if it works. (If
> it is a php file that is supposed to be accessed via the web server, it
> will probably not work.)
>
> Best regards,
> Patrick Asselman


Thanks everyone, got it sorted.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 04:22 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org