[GH-ISSUE #363] Feature Request: Task Schedule command #226

Closed
opened 2026-03-02 02:14:39 +03:00 by kerem · 3 comments
Owner

Originally created by @dinger1986 on GitHub (Apr 4, 2021).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/363

Originally assigned to: @sadnub on GitHub.

At the moment need to add a script, so for example I have SQL databases backed up to a disk and need to keep that tidy, wanted to apply a task to delete it but had to write a script for that which just means I have more scripts and this one is specific to this server for 1 customer and is one line

It would be nice to able to schedule a command rather than only Scripts

I guess this could maybe be done by creating a script that calls cmd and then add in additional script arguments with the actual command. Maybe thats the solution?

Originally created by @dinger1986 on GitHub (Apr 4, 2021). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/363 Originally assigned to: @sadnub on GitHub. At the moment need to add a script, so for example I have SQL databases backed up to a disk and need to keep that tidy, wanted to apply a task to delete it but had to write a script for that which just means I have more scripts and this one is specific to this server for 1 customer and is one line It would be nice to able to schedule a command rather than only Scripts I guess this could maybe be done by creating a script that calls cmd and then add in additional script arguments with the actual command. Maybe thats the solution?
kerem 2026-03-02 02:14:39 +03:00
Author
Owner

@tremor021 commented on GitHub (Apr 14, 2021):

$Trigger= New-ScheduledTaskTrigger -At 10:00am –Daily # Specify the trigger settings
$User= "NT AUTHORITY\SYSTEM" # Specify the account to run the script
$Action= New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "YOUR COMMAND HERE" # Specify what program to run and with its parameters
Register-ScheduledTask -TaskName "Task 001" -Trigger $Trigger -User $User -Action $Action -RunLevel Highest –Force # Specify the name of the task

If deletion is all you do, this will add a task in task scheduler to do it every day at 10am for example. just replace Argument with what you need done

<!-- gh-comment-id:819306592 --> @tremor021 commented on GitHub (Apr 14, 2021): ``` $Trigger= New-ScheduledTaskTrigger -At 10:00am –Daily # Specify the trigger settings $User= "NT AUTHORITY\SYSTEM" # Specify the account to run the script $Action= New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "YOUR COMMAND HERE" # Specify what program to run and with its parameters Register-ScheduledTask -TaskName "Task 001" -Trigger $Trigger -User $User -Action $Action -RunLevel Highest –Force # Specify the name of the task ``` If deletion is all you do, this will add a task in task scheduler to do it every day at 10am for example. just replace Argument with what you need done
Author
Owner

@dinger1986 commented on GitHub (Apr 14, 2021):

Have got it working with a batch file as well. Does everything I need it to do but think @wh1te909 is going to add it as an option anyway

<!-- gh-comment-id:819310215 --> @dinger1986 commented on GitHub (Apr 14, 2021): Have got it working with a batch file as well. Does everything I need it to do but think @wh1te909 is going to add it as an option anyway
Author
Owner

@sadnub commented on GitHub (Jan 10, 2022):

In the next release you will be able to issue a command in a scheduled task

<!-- gh-comment-id:1008905649 --> @sadnub commented on GitHub (Jan 10, 2022): In the next release you will be able to issue a command in a scheduled task
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#226
No description provided.