Page 1 of 2

CRON jobs

Posted: Thu Aug 14, 2014 11:12 am
by vestacp89
Hello All,

I install vestacp, i'm new with vestacp,
Now i try start cron job,
I don't know what is my command

e.g. for cpanel is:

Code: Select all

/usr/bin/php -q /home/domain/public_html/cron.php
Anyone know what is vestacp path ?

Also how i edit cron jobs time, if i want e.g. start every 10min then this look like on this photo ?

Image

Thanks.

Re: CRON jobs

Posted: Thu Aug 14, 2014 12:55 pm
by imperio
Hello, vestacp89
you can using one of this commands

Code: Select all

/usr/bin/php /home/your user/web/your_domain.com/public_html/cron.php
php -q /home/your user/web/your_domain.com/public_html/cron.php
wget http://your_domain.com/cron.php

Re: CRON jobs

Posted: Thu Aug 14, 2014 1:05 pm
by vestacp89
imperio wrote:Hello, vestacp89
you can using one of this commands

Code: Select all

/usr/bin/php /home/your user/web/your_domain.com/public_html/cron.php
php -q /home/your user/web/your_domain.com/public_html/cron.php
wget http://your_domain.com/cron.php
Hello Imperio,

Thanks for fast answer,
just please tell me for photo, this command show cron who will run every 10min i'm right/wrong ?

Image

Thanks.

Re: CRON jobs

Posted: Thu Aug 14, 2014 1:13 pm
by imperio

Code: Select all

*/10
every 10 minutes

Re: CRON jobs

Posted: Thu Aug 14, 2014 1:32 pm
by vestacp89
imperio wrote:

Code: Select all

*/10
every 10 minutes
Now work but i get this mail:

Code: Select all

PHP Notice:  Use of undefined constant APP_NAME - assumed 'APP_NAME' in /home/admin/web/page-domain-name.com/public_html/app/cron.php on line 6
after this cron continue normal work, i can ignore this mail or ? maybe they send me this error because my domain have 2 ''-'' e.g.

Code: Select all

something-something-something.com
?

Thanks.

Re: CRON jobs

Posted: Thu Aug 14, 2014 1:37 pm
by imperio
PHP Notice: Use of undefined constant APP_NAME - assumed 'APP_NAME' in /home/admin/web/page-domain-name.com/public_html/app/cron.php on line 6
I think that problem in your cron script

Re: CRON jobs

Posted: Thu Aug 14, 2014 1:39 pm
by vestacp89
imperio wrote:
PHP Notice: Use of undefined constant APP_NAME - assumed 'APP_NAME' in /home/admin/web/page-domain-name.com/public_html/app/cron.php on line 6
I think that problem in your cron script
I remove this cron job,
Start again with some little edited,
Now send me empty mail,
Look like i fix this problem ?

Thanks.

Re: CRON jobs

Posted: Thu Aug 14, 2014 3:29 pm
by imperio
I think your problem is solved

Re: CRON jobs

Posted: Thu Aug 14, 2014 5:18 pm
by vestacp89
Yes i think,
Now i'm confused with cron command,
e.g. on this photo is cron run every 1 hour ?

Image

Thanks.

Re: CRON jobs

Posted: Thu Aug 14, 2014 5:55 pm
by imperio
on this photo is cron run every 1 hour ?
yes

Minute

Code: Select all

*
Hour

Code: Select all

*/1