resubmit sitemap automatically using curl

How to resubmit generated sitemaps automatically (using cron) or on an event (like re-generation of the sitemap).


And the function goodiness….