Skip to content

Feature Request: Set Task Priority Upon/After Creation #82

@nigeljmckernan

Description

@nigeljmckernan

I have loved using the package so far, really saves tedious steps creating new tasks in Windows.

The one feature I think would really be great is to set the task Priority so that certain tasks could be (potentially) completed faster than others.

When creating a new task in Task Scheduler, Windows by default sets the task priority to 7 (0 is highest priority, 10 is lowest, for reference). When normally (interactively) running a process/script/program/etc. in Windows the priority for that task is set to 4. This usually means the task when automated to run in Task Scheduler completes much slower.

A personal example: I have an R script that's set to run Monday mornings for my work. If I run it manually (even through Rscript.exe) it usually only takes half an hour to run. Meanwhile, when Task Scheduler runs it, it nearly takes 4 hours to complete.

Could there be an additional argument in taskscheduler_create() to set the priority of the task when creating it?

The manual solution for this so far has been to export the task after being created in Task Scheduler, delete the task, edit the exported XML file, and change the priority from 7 to something lower, like 4, and then import it back in to Task Scheduler.

I realize this isn't a major request or anything, but it would be pretty cool!

Regardless if this gets implemented, thanks for the package!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions