Hi folks. I have a cron problem with my wordpress 3 site. My host has suspended the site several times int he past becuase it was using too many resources on the server. I have a feeling its an old piece of code ot something but I havent a clue as to how to find it. At present I have disabled cron jobs completely. But would like to sort out the problem rather than masking it. Has anyone any cron expertise who is willing to help me?
usually the problem with cron is it uses too much resource of the site. i once build a bot and the memory went up to the roof because of bad coding. the memory limit of the program usually 64M if you like, i can try to look at your code.
Try to set low "Max Execution Time" in PHP because sometimes when you have high MAX EXEC time and also script doesn't close itself like big loops that only close when script exceed its MAX EXEC time. It will take unnecessary cpu usage. Also try to set Cron Timings more efficiently that suits your server. Like if possible change per hour cron to per 5 hours or 1 day and see the result.
use a cron job like that it reads specific table which contains specific action and parameters and based on that action it will executes best option is write a shell program for this
You should hire a programmer to go through the code that is being ran by the cron events and ask for them to clean up the code and manage the memory issues by reducing the memory being used for you. It could be php, to much being ran, the run time could be to long, mostly I find the major thing that get ppl into trouble is SQL calls. Sites like this one if they did not redo and off load the resources then they would be over powered. Also, you might look into off loading to another server, getting a vpn or your own server to run your websites.