How to write a drupal cron job to fetch data from a link How can I write drupal cron job that fetches data from a link and update the database ..? Im new to drupal so unable to understand the working of cron after searching alot. Any help will be appreciated ..
Create a simple Drupal 7 module, there are a lot of examples for this (i.e. here). Then hook into cron with a function mymodulename_cron() and inside the mymodule_cron function fetch your json data.

Your mymodulename_cron() will be executed each time, the drupal cron is run. This can be done from outside or from the admin/reports page. Look at /admin/reports/status for info about this.