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
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
2
Answers
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:
For scheduling your task need to use the function "wp_schedule_event"
After this, you can add the cron command to "Cron Jobs":
You could just include
wp-load.php
from your yourcfile.php
.