{"id":23763668,"url":"https://github.com/tomashubelbauer/powershell-scheduled-tasks","last_synced_at":"2026-04-12T23:48:52.699Z","repository":{"id":107986241,"uuid":"217685128","full_name":"TomasHubelbauer/powershell-scheduled-tasks","owner":"TomasHubelbauer","description":"Creating and updating scheduled tasks using PowerShell","archived":false,"fork":false,"pushed_at":"2022-04-28T08:51:35.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-10T03:06:14.318Z","etag":null,"topics":["powershell"],"latest_commit_sha":null,"homepage":"","language":"Markdown","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomasHubelbauer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-26T09:20:21.000Z","updated_at":"2022-04-17T10:05:04.000Z","dependencies_parsed_at":"2023-05-15T11:15:30.115Z","dependency_job_id":null,"html_url":"https://github.com/TomasHubelbauer/powershell-scheduled-tasks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TomasHubelbauer/powershell-scheduled-tasks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fpowershell-scheduled-tasks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fpowershell-scheduled-tasks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fpowershell-scheduled-tasks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fpowershell-scheduled-tasks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomasHubelbauer","download_url":"https://codeload.github.com/TomasHubelbauer/powershell-scheduled-tasks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fpowershell-scheduled-tasks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275128165,"owners_count":25410367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["powershell"],"created_at":"2024-12-31T22:13:14.877Z","updated_at":"2026-04-12T23:48:52.664Z","avatar_url":"https://github.com/TomasHubelbauer.png","language":"Markdown","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Manage Scheduled Tasks in Windows using Powershell\n\n## Create\n\n```powershell\n$action = New-ScheduledTaskAction -Execute \"notepad\" -Argument \"file.txt\"\n$now = Get-Date\n$interval = New-TimeSpan -Seconds 5\n$forever = [System.TimeSpan]::MaxValue\n$trigger = New-ScheduledTaskTrigger -Once -At $now -RepetitionInterval $interval -RepetitionDuration $forever\n$settings = New-ScheduledTaskSettingsSet\n$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings\nRegister-ScheduledTask -TaskName 'TEST' -InputObject $task\n```\n\nCan't use `:` in the task name!\n\n## List\n\n```powershell\nGet-ScheduledTask\nschtasks /query\nGet-ScheduledTask -TaskName \"Tom - *\"\n```\n\n## Sources\n\n- https://support.microsoft.com/en-us/help/814596/how-to-use-schtasks-exe-to-schedule-tasks-in-windows-server-2003\n- https://docs.microsoft.com/en-us/powershell/module/scheduledtasks/set-scheduledtask\n- https://docs.microsoft.com/en-us/powershell/module/scheduledtasks\n\n## To-Do\n\n### https://community.spiceworks.com/how_to/17736-run-powershell-scripts-from-task-scheduler\n\n### https://devblogs.microsoft.com/scripting/weekend-scripter-use-the-windows-task-scheduler-to-run-a-windows-powershell-script/\n\n### Await Stack Overflow help on scheduling the task\n\nhttps://stackoverflow.com/q/59569150/2715716\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomashubelbauer%2Fpowershell-scheduled-tasks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomashubelbauer%2Fpowershell-scheduled-tasks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomashubelbauer%2Fpowershell-scheduled-tasks/lists"}