gpt-3.5-turbo-0125· OpenAI
WildChat-4.8M (AI2)
I need the powrshell syntax for a task trigger to run every day every 5 minutes
- User
I need the powrshell syntax for a task trigger to run every day every 5 minutes
- Assistant
You can create a PowerShell script that uses the
Register-ScheduledJobcmdlet to schedule a task to run every day every 5 minutes. Here is an example syntax of how to do this:$trigger = New-JobTrigger -Daily -At "12:00 AM" -RepetitionInterval "00:05:00" $options = New-ScheduledJobOption -RunElevated -ContinueIfDowwntimeResumed Register-ScheduledJob -Name "DailyTask" -Trigger $trigger -ScriptBlock { # Your script code here } -ScheduledJobOption $optionsThis code will create a scheduled task named "DailyTask" that runs every day at midnight and repeats every 5 minutes. You can replace the placeholder comment
# Your script code herewith the actual code you want to run in the scheduled task.