i am getting the following error while running the cron on the web browser:
!!! Sorry, internet access to this page has been disabled by the administrator. !!!
By default you cannot run the cron using the web browser, only by running the script on the command line.
To be able run the cron using a browser you must untick Cron execution via command line only under Site administration → Security → Site policies. You can optionally set a password in Cron password for remote access so that only people knowing the password can run the cron.
It's documented here: https://docs.moodle.org/en/Site_policies#Cron_execution_via_command_line_only