Suppose there is a domain divya.com which has a login form. You need to login to the site every hour, to make sure that the login is working. For that the following script helps, which can be run as a cron.
##Specify the cookie file and access another link to see if it works. If login works, you will get the code of this page, otherwise it will get redirected to the login page itself, returning a 302 status code##
Execute the script for testing by giving the correct login details as well as wrong login details. If wrong details are given, check if you are getting mail to your address.
Now run the same as a cron every hour.