I want to add cron jobs to my Drupal 7 system, but I can't figure out how. The examples I've read on Google doesn't explain at all where to put your code. Do you have to do a module in order to use the my\_module\_cron()? 

I have a block which uses some data received from a remote place. A cron job fetching these remote data is what I need to do. Can't I add my cron job in the code for my block?

Thanks in advance..