Osclass Support Forums

General osclass questions => General discussion => Topic started by: ads365 on January 25, 2021, 04:06:51 PM

Title: Setup for Cron Job
Post by: ads365 on January 25, 2021, 04:06:51 PM
I disabled the CronJob in Admin Panel and setup the Cron Command in Cpanel . I am using BigRock.in Server
I Used below command for Cron Job

/usr/local/bin/ea-php99/home/s**p***/public_html/ads365.in/oc-includes/osclass/cron.php

I just needs to know whether it is correct command or need some amendment?  Above is the exact command which I am using in my cPanel.
Title: Re: Setup for Cron Job
Post by: MB Themes on January 25, 2021, 07:06:32 PM
@ads365
You should check such details with your hosting provider.
Title: Re: Setup for Cron Job
Post by: ads365 on January 26, 2021, 08:18:30 AM
@ads365
You should check such details with your hosting provider.

Ok I shall Check
Title: Re: Setup for Cron Job
Post by: MB Themes on January 26, 2021, 08:39:35 AM
@ads365
Btw. you should be able to enter notification URL in case there is problem with your cron, you will get email.
Title: Re: Setup for Cron Job
Post by: ads365 on January 28, 2021, 02:38:00 AM
@ads365
Btw. you should be able to enter notification URL in case there is problem with your cron, you will get email.

I am getting the notification on email stating below:

/home/s**co***/public_html/ads365.in/oc-includes/osclass/cron.php: line 1: syntax error near unexpected token `('
/home/s**p**/public_html/ads365.in/oc-includes/osclass/cron.php: line 1: `<?php if ( ! defined( 'ABS_PATH' ) ) {
'

I checked the File also but found nothing like that..

See below code and screen shot

<?php if ( ! defined( 'ABS_PATH' ) ) {
   exit( 'ABS_PATH is not loaded. Direct access is not allowed.' );
}


Title: Re: Setup for Cron Job
Post by: ads365 on January 29, 2021, 06:26:14 AM
@ads365
Btw. you should be able to enter notification URL in case there is problem with your cron, you will get email.

I am getting the notification on email stating below:

/home/s**co***/public_html/ads365.in/oc-includes/osclass/cron.php: line 1: syntax error near unexpected token `('
/home/s**p**/public_html/ads365.in/oc-includes/osclass/cron.php: line 1: `<?php if ( ! defined( 'ABS_PATH' ) ) {
'

I checked the File also but found nothing like that..

See below code and screen shot

<?php if ( ! defined( 'ABS_PATH' ) ) {
   exit( 'ABS_PATH is not loaded. Direct access is not allowed.' );
}

Any Update and solution for above Issue ? Waiting for the reply...
Title: Re: Setup for Cron Job
Post by: osclassics on November 11, 2021, 10:58:14 AM
exact same problem here. any solutions?
Title: Re: Setup for Cron Job
Post by: mwindey on November 11, 2021, 11:49:19 AM
You cannot execute the file  directly because of security reasons
For Directadmin my setup that works is: php /home/s**p***/domains/your*domain.com/public_html/index.php -p cron -t daily
php /home/s**p***/domains/your*domain.com/public_html/index.php -p cron -t hourly
php /home/s**p***/domains/your*domain.com/public_html/index.php -p cron -t weekly
Title: Re: Setup for Cron Job
Post by: osclassics on November 11, 2021, 12:03:58 PM
You cannot execute the file  directly because of security reasons
For Directadmin my setup that works is: php /home/s**p***/domains/your*domain.com/public_html/index.php -p cron -t daily
php /home/s**p***/domains/your*domain.com/public_html/index.php -p cron -t hourly
php /home/s**p***/domains/your*domain.com/public_html/index.php -p cron -t weekly

Thanks for your prompt response! I assume this is for an OsClass install, right?

Do you know the suffix for running it every minute?
Title: Re: Setup for Cron Job
Post by: mwindey on November 11, 2021, 02:53:37 PM
It is for Osclass you can set suffix to run hourly cron every minute in your cPanel normally