Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7178509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:56:07+00:00 2026-05-28T16:56:07+00:00

I created a windows task and scheduled to run every 1 hour. Every hour

  • 0

I created a windows task and scheduled to run every 1 hour.

Every hour the task runs but am getting an warning Task Scheduler did not launch task "\Sample Task" because computer is running on batteries. User Action: If launching the task on batteries is required, change the respective flag in the task configuration. and task exits pre-maturely.

I am using SCHTASKS.exe for creating task as I need to create task taking user input from a form.

Using the command I want to remove the power option.
enter image description here
Is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:56:08+00:00Added an answer on May 28, 2026 at 4:56 pm

    As you’ve probably already observed, schtasks.exe does not provide a command-line switch to toggle the power settings.

    You basically have two solutions:

    1. You can create an XML file with the desired options, and then create the task on the command line from that XML file.

      For example, you would include the following settings element in your XML file:

      <Settings>
          <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
      </Settings>
      
    2. You can write code that sets the ITaskSettings::DisallowStartIfOnBatteries property to the desired value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I scheduled a task on Windows-XP using schtasks utility, but the task does not
I created a task in Windows 7 task scheduler. How do I run it
trying to run a simple batch file in windows 2008 task scheduler call cleanup.bat
I need to create and modify tasks in Windows Task Scheduler on Windows Server
I have created a Windows Forms application in .NET 2 using C# that runs
Scenario I've created a windows service, but whenever I start it, it stops immediately.
I'm developing add-on based application. Every add-on use scheduler. Loaded add-on schedule task. My
I need to run a task every 10 mins from morning 9 AM to
I currently have an ASP Classic script that runs every 15 minutes (via scheduled
I'm trying to script windows scheduled task creation with powershell, where the schedules tasks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.