Not sure if sleep() functions will help, since the monitoring they are doing appears to be cumulative over time, and because that script is being run every five minutes it will stand out as a "heavy" script to their automatic program that is looking for such scripts. The actual CPU load from cron.php on EACH RUN is quite minimal. Sleep functions might only increase the work being done!
You could try reducing your cron period to something less often, like 10, 15 or 20 minutes.
Martin Dougiamas
Posts made by Martin Dougiamas
You need to create the directory /home/chungi/public_html/moodledata with web server write access. 
That is, create the directory, then change the permissions of it so that it is writeable by the web server program.
That is, create the directory, then change the permissions of it so that it is writeable by the web server program.
It's might be an error in config.php - check the dirroot parameter closely - it should be a full path to the install directory and the case should be correct.
Check also that you haven't missed out a double quote around a variable, or perhaps a semi-colon somewhere.
Post it here as an attachment if you still have trouble.
Check also that you haven't missed out a double quote around a variable, or perhaps a semi-colon somewhere.
Post it here as an attachment if you still have trouble.
Check your php.ini ... can you make sure:
magic_quotes_runtime = Off
magic_quotes_runtime = Off