For me cronjob is a very new feature, so I would need some help from you guys.
I need to create a cronjob that will run at every 8 hours some php scripts.
vend_1.php
vend_2.php
vend_3.php
vend_4.php
vend_5.php
vend_6.php
vend_7.php
vend_8.php
vend_9.php
Location of php scrips is within my theme on wordpress.
So the path is :"/wp-content/themes/mythemename/vend_1.php
“
I know that i need to have permissions so i set 0777
for all the files.
I already found how to run at every 8 hours:” 0 */8 * * *
“.
I created the file cron.php within my theme path: /wp-content/themes/mythemename/cron.php
I don’t know what i need to put in my cron.php. So I will be very happy is someone could help me.
create a file
phpcron.sh
withchmod 777
.and in the crontab just write :
thats it.
If you already have a cron job set to execute
/wp-content/themes/mythemename/cron.php
every 8 hours, then you can do this:Copy the following code into
cron.php
:The act of including those vend_x.php file will execute the scripts.