Skip to content

It's not possible to create the equivalent of "schtasks /create /SC minute" #212

Description

@dhs-rec

Describe the Bug

When I want to create a scheduled task that runs every minute, indefinitely, I need to use an exec resource that runs

schtasks /create /SC minute ...

instead of scheduled_task, because the latter is not capable of creating an equivalent task (trigger).

Expected Behavior

Being able to define a scheduled task with a One time trigger that runs every minute, indefinitely (this is what above schtasks command does).

Steps to Reproduce

Try to define a scheduled_task with a once trigger that repeats every minute, indefinitely. Due to the restrictions on start_date, start_time and minutes_duration it is not possible to get the exact same result as with schtasks.

Environment

  • 6.27.1
  • Windows

Additional Context

Task trigger created by above command looks like (in Task Scheduler)

  • Trigger: "One time"
  • Details: "At on - After triggered, repeat every 00:01:00 indefinitely."

Bonus: With schtasks, I can provide the command to execute simply as "powershell", whereas with scheduled_task I need to specify the full path...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions