I wanted to use wordpress 'tera wallet' plugin's functions in standalone cron file which is configured under cpanel -> Cron Jobs
php -q /home3/samadha1/xxxx.in/wp-content/plugins/woo-wallet/cfile.php
CodePudding user response:
Wordpress has the own cron system.
For using cron by command line need to change wp-config.php :
Open your wp-config.php file
Go to the bottom of the database settings in wp-config.php. Add the code:
define('DISABLE_WP_CRON', 'true');
After this, you can add the cron command to "Cron Jobs":
php -q /home3/samadha1/xxxx.in/wp-cron.php
CodePudding user response:
<?php
require_once __DIR__ . '/../../../wp-load.php';
if (!is_plugin_active('woo-wallet/woo-wallet.php')) {
echo 'woo-wallet plugin is not active';
exit(1);
}
echo 'hello cron';