*

ads365

  • **
  • 11 posts
Setup for Cron Job
« 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.

*

MB Themes

Re: Setup for Cron Job
« Reply #1 on: January 25, 2021, 07:06:32 PM »
@ads365
You should check such details with your hosting provider.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

ads365

  • **
  • 11 posts
Re: Setup for Cron Job
« Reply #2 on: January 26, 2021, 08:18:30 AM »
@ads365
You should check such details with your hosting provider.

Ok I shall Check

*

MB Themes

Re: Setup for Cron Job
« Reply #3 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.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

ads365

  • **
  • 11 posts
Re: Setup for Cron Job
« Reply #4 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.' );
}



*

ads365

  • **
  • 11 posts
Re: Setup for Cron Job
« Reply #5 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...
« Last Edit: January 31, 2021, 03:38:41 PM by ads365 »

*

osclassics

  • **
  • 12 posts
Re: Setup for Cron Job
« Reply #6 on: November 11, 2021, 10:58:14 AM »
exact same problem here. any solutions?

*

mwindey

  • *****
  • 461 posts
Re: Setup for Cron Job
« Reply #7 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

*

osclassics

  • **
  • 12 posts
Re: Setup for Cron Job
« Reply #8 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?

*

mwindey

  • *****
  • 461 posts
Re: Setup for Cron Job
« Reply #9 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