Added function to take images every hour