I mean i cannot run the page every 1 hour to get my images. I think you're missing the point of the image caching functionality in Drupal..request the URL for the image file directly, not the node page.It's the request for the image URL that causes Drupal to either serve an already created image from cache, or create a new one if none exists.
In Drupal image styles are used to determine how an image will be displayed on the frontend of your site.They can be used to scale, crop, rotate images and add various effects.To manage image styles, log in to the admin panel of your Drupal, click on the Configuration tab in the top navigation bar, and on the page that opens click on Image Styles (it's in the Media section): On the page that is displayed you'll see a table with the existing image styles.By default, Drupal comes with three preconfigured image styles: thumbnail, medium, large.Viewing a node page causes this as a side effect because your browser requests the image URL to display it in your page.
Viewing the node page has absolutely nothing to do with the images being generated other than what I've already mentioned.
After file deletion, hook_image_style_flush implementations are invoked and may be used to re-generate the derivative files if needed.
Since this would be a long operations, I suggest using the Queue API to delay the operations and split it in smaller chunks of work.
I tried to curl and request the page on a time interval for the page to get generated but it seems you have to really view the page. Would doing a batch operation to just view the nodes using node_view help ? Yes that is right, i can run a page that has all images and i am good to go.
But i am using these images in an external platform, requesting the images is not the best way to do it.
In Drupal you can upload and put images in content items (nodes), registered users can upload pictures for avatars; you can add many image fields to content types, user profiles, etc.