Igor Simic
5 years ago

How to create cron task on Windows server





Fastest way to set up running cron job task on Windows Server is adding Scheduled Task by using command line.

Open your cmd (with admin rights if possible) and enter this line

schtasks /create /tn "Generate sitemap" /tr "C:\PR
OGRA~1\MOZILL~1\firefox.exe http://example.com/cron-job" /sc daily 

This command will create scheduled task named "Generate sitemap" and it will call http://example.com/cron-job  daily