Skip to content

Instantly share code, notes, and snippets.

@lyonsun
Created September 11, 2014 14:41
Show Gist options
  • Save lyonsun/9d201b3ec1fc8d8056ea to your computer and use it in GitHub Desktop.
Save lyonsun/9d201b3ec1fc8d8056ea to your computer and use it in GitHub Desktop.
power shell script to schedule a task that send http get to a url on command line
schtasks /create /tn "MyAppDailyUpdate" /tr "powershell -ExecutionPolicy unrestricted -Command \"(New-Object Net.WebClient).DownloadString(\\\"http://localhost/cron.aspx\\\")\"" /sc DAILY /ru System
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment