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

  • SEARCH
  • Home
  • 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 6871083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:45:44+00:00 2026-05-27T03:45:44+00:00

I am trying to schedule a reboot programmablly on winxp by using c# currently,

  • 0

I am trying to schedule a reboot programmablly on winxp by using c#
currently, i program it to add a scheduled task in winxp to reboot in 5 min
however, it does not always work because the machine time maybe changed after restart (there is time server in my environment). so that means the scheduled task time is not accurate, in turn my reboot does not work on expected time.

For example, when i added scheduled reboot task, the machine time is 11:05 am and the reboot the is scheduled to 11:10am. then i joined xp to domain and restart, the time got synced with time server and machine changed to 1:01pm.
in this case, the scheduled task has a time 11:10am on same day, it’s past. of course it won’t work.

so anybody know any other way to do it?
ps: this program is used before joining xp to domain
and reboot is scheduled because it’s 2nd reboot and i need it automatically reboot without user interactions

  • 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-27T03:45:44+00:00Added an answer on May 27, 2026 at 3:45 am

    Use the built-in shutdown command by launching a new process from C#:

    using System;
    using System.Diagnostics;
    
    namespace ShutdownApp
    {
        class ShutdownApp
        {
            static void Main(string[] args)
            {
                Process shutDown = new Process();
                int shutdownTimeInSeconds = 600; // this will shutdown in 10 minutes, use DateTime and TimeSpan functions to calculate the exact time you need    
                shutDown.StartInfo.FileName  = "shutdown.exe";
                shutDown.StartInfo.Arguments = string.Format("-r -t {0}", shutdownTimeInSeconds);
    
                shutDown.Start();
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to schedule con style job using advanced python scheduler. Everything is
I'm having issues when trying to schedule a UILocalNotification using the following code: -
I'm trying to schedule a long T-SQL script. However, the script gets cut off
I am trying to schedule a build to be run at a scheduled time
I am trying to schedule a timer using the timertask. I want to freeze
I am trying to schedule a function call for a sequence of items using
I'm using SQL Server 2008 and trying to make schedule to run a page
I'm trying to schedule a job on a remote scheduler using the following code:
I'm trying to connect to the server https://www.xpiron.com/schedule in a ruby script. However, when
I am trying to process salary details of employees depends upon some schedule using

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.