Skip to content

Instantly share code, notes, and snippets.

@treffynnon
Created February 4, 2010 15:19
Show Gist options
  • Save treffynnon/294732 to your computer and use it in GitHub Desktop.
Save treffynnon/294732 to your computer and use it in GitHub Desktop.
PHP: Scheduled tasks executed from PHP
<?php
exec('schtasks /Delete /TN taskname /F');
exec('schtasks /Create /RU username /RP password /SC MINUTE /MO 2 /TN taskname /TR “C:\Program Files\wget\wget.exe --header=TASK_KEY:my-secret-key –U my-agent http://www.webaddress.com/script.php -r');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment