HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Cron Job php with '.....' in the ending (http://www.howtoforge.com/forums/showthread.php?t=58843)

Imam86 24th September 2012 02:32

Cron Job php with '.....' in the ending
 
Hello.. I'd like to ask about php cron job with '....' in the ending.

30 * * * * php -q /var/www/clients/client5/web5/web/billing/services.php 'mailer'


I'm using Debian Squeeze, with ISPConfig 3.0.4.6
And from this tutorial: http://www.howtoforge.com/perfect-se...ot-ispconfig-3

I configured like this:

Client Limits
--------------

Code:

Max. number of Shell users : 0
Allowed Cronjob : Chrooted Cron

Cron Job
----------

Code:

Command to run: https://example.com/billing/services.php 'mailer'
Code:

root@server1:~# ls -la /etc/cron.d
total 40
drwxr-xr-x  2 root root 4096 Sep 23 14:35 .
drwxr-xr-x 105 root root 4096 Sep 23 14:32 ..
-rw-r--r--  1 root root  179 Dec 16  2010 amavisd-new
-rw-r--r--  1 root root  243 Sep 20 15:46 awstats
-rw-r--r--  1 root root  74 Sep 22 04:15 ddos.cron
-rw-r--r--  1 root root 1474 Sep 23 14:44 ispc_web5
-rw-r--r--  1 root root 1393 Sep 20 15:35 mailman
-rw-r--r--  1 root root  506 Sep  6 07:05 munin-node
-rw-r--r--  1 root root  499 Sep 14 05:59 php5
-rw-r--r--  1 root root  102 Dec 18  2010 .placeholder

Code:

root@server1:~# cat /etc/cron.d/ispc_web5
MAILTO=''
SHELL='/bin/sh'

30      *      *      *      *      web5    /usr/bin/wget -q -t 1 -T 7200 -O /dev/null 'https://example.com/member/services.php '\''mailer'\''' >/dev/null 2>&1        #example.com


But I got this error:

Code:

root@server1:~# cat /var/log/syslog
server1 /USR/SBIN/CRON[25156]: (CRON) error (grandchild #25163 failed with exit status 8)


I really don't understand, I use the same configuration with the other php files, and it's running cron job well, but with '....' in the ending? :confused:

I'm sorry for my bad English.

How to solve this..??

Thanks for your help and attention.

Imam86 24th September 2012 03:36

[solved]
 
Ohh.. I got it. :eek:

I check the php files again.

Cron Job
----------

php -q /var/www/clients/client5/web5/web/member/services.php 'mailer'


The previous setting in ISPConfig:
Code:

https://example.com/billing/services.php 'mailer'
It should be:
Code:

https://example.com/billing/services.php?service=mailer
Because it's not configured to run cron from URL.

This cron job is one of my friend request, but I try to run it with ISPConfig system, and it works now.

Thanks for the ISPConfig developers.

I love you all.. :)


All times are GMT +2. The time now is 11:55.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.