Scheduled Reboot For Macintosh Os X

As far as I know, you cannot use cron to schedule tasks for 'last Friday of each month' or 'third Thursday in each month'. What you can do, however ugly it seems, is to have a script run every Saturday at 23:30 and then have this script determine if this particular Saturday is the third Saturday of the week (can be done using date and maybe cal commands). Nearly everyone knows by now that the next version of the Mac operating system – OS X Mountain Lion (which is actually OS X version 10.8), is scheduled to be released sometime this summer.At the moment however, it’s still only a developer preview that’s not quite ready for prime time, and contains quite a few bugs and issues that are still being ironed out. Mar 17, 2019 Workstation Images created with Tiger are platform-specific: Use an Intel-based Macintosh to create workstation images for other Intel-based Macs, and a PowerPC-based Macintosh to create workstation images for other PowerPC-based Mac.) A Mac OS X 10.4.x (Tiger) or 10.5.x (Leopard) DVD, to install the operating system. Disk Utility, an.

Learning has never been so easy!

Create a Scheduled task to have your server reboot at a scheduled interval. This works on Windows server 2003 and newer. I have not looked for a solution on Windows server 2000, because we do not have any in out network.

9 Steps total

Step 1: Open the Task Scheduler

Open the Scheduled Task
START ->All Programs ->Accessorier -> System Tools -> Scheduled Tasks

Step 2: Create a new task

Double Click on the 'Add a New Scheduled Task'

Step 3: Follow the Scheduled Task Wizard

Click 'Next'

Mac Os Reboot Command

Step 4: Select the program to run

Click on Browse to select the proper program and location to run. Navigate to 'C:WINDOWSSystem32shutdown.exe'

Step 5: Select the Frequency

This is where you set how often you want to 'task' to exicute. So if you wanted your server to reboot weekly you select 'weekly'

Step 6: Select the time and day you want the task to start.

This can be once a week at 3 AM or every Wednesady and Friday nights.

Step 7: Enter the username and password for a user

This is the user that the scheduled task will run as. I suggest using an account that has domain admin privileges.

Reboot

Step 8: You have successfuly scheduled the following task

At this point you would be done, if you wanted the server to shutdown at the scheduled time. We are going to select the Open Advanced options when I click finished. Then click Finish

Step 9: Advanced Options

Reboot

In the Run option you will see the location of the shutdown program. we are going to add some options.

-r This wil have ther server shutdown and then restart
-f This will force the server to force any running application to close
-t 01 This is a time-out before shutdown.

so the full run command is:
C:WINDOWSsystem32shutdown.exe -r -f -t 01

Select Apply and then OK

You can also look at the scheduled taks properties and change the schedule or frequency of the reboots.

Published: Mar 23, 2009 · Last Updated: Jan 17, 2018

16 Comments

  • Serrano
    Jackson6932 Mar 23, 2009 at 04:36pm

    Just be a bit wary of any other scheduled tasks that would be running at the time you specify (Backups, SQL jobs etc.) as obviously they will fail if the server turns itself off half way through

  • Pimiento
    Steve5155 Mar 30, 2009 at 11:14am

    Or you could type something like the following at the command prompt.

    at 03:00 shutdown /r

    This will add the scheduled task for the next occurence of that time only, to have it repeat lookup the at command help with 'at /?'.

  • Pimiento
    Steve5155 Mar 30, 2009 at 11:15am

    You can check for tasks quickly by typing 'at' in the cmd prompt.

  • Sonora
    Bruce1124 Mar 2, 2011 at 11:07am

    We have schedualed the servers to be doing nothing Sunday morning between midnight and 4:00 am so it is a great time for a schedualed reboot.
    Then we can clear up the backlog of updates requiering a reboot.

  • Jalapeno
    ringe Nov 14, 2012 at 08:07pm

    I would like to point out how insecure this approach is because the password is in clear text in the registry.

    I would like to recommend LogonExpert at http://www.logonexpert.com/

  • Pimiento
    phillipmcturner Jul 23, 2013 at 01:28am

    is there any way to force your server to reboot based on a trigger? if (xxy) stops responding, then (reboot)?

  • Tabasco
    RumRaisin Sep 9, 2013 at 05:21pm

    Yes, this is possible, however only for Windows Server 2008. Open the task scheduler, and select a task to modify or create a new one under the tiggers tab. You can trigger an event based off of an event log.

  • Anaheim
    PolarPeter Dec 4, 2013 at 04:37pm

    The Server is shutting down but it has a 'You can now recycle the power' screen and doesn't actually shutdown completely, therefore doesn't reboot.
    How can one bypass that screen?
    I am using. shutdown.exe -r -f -t 01

  • Anaheim
    PolarPeter Dec 4, 2013 at 08:54pm

    Never mind.
    I used pstools and psshutdown -r works for me.

  • Thai Pepper
    AdamM1968 Sep 13, 2016 at 03:00pm

    Thanks for this..it really has helped cut down on my weekly reboots. Works great.

  • Pimiento
    Aleksey120 Nov 8, 2017 at 02:23pm

    I wrote this simple PS script. Works on 2008+

    [CmdletBinding()]
    Param(
    [Parameter(Mandatory=$true,HelpMessage='RestartDate Format: dd-MM-yyyy HH:mm')]
    [ValidateScript({[DateTime]::ParseExact($_, 'dd-MM-yyyy HH:mm', $null)})]
    $RestartDate,
    [Parameter(Mandatory=$true)]
    [string]$Reason
    )

    $now = get-date
    $PostponeTo = get-date($RestartDate)
    $secToRestartTimeFromNow = $PostponeTo - $now

    $sec = [math]::round($secToRestartTimeFromNow.TotalSeconds)
    $cmd = 'shutdown /r /t $sec /d P:0:0 /c '$reason'

    Mac

    Write-Host 'Running:'
    $cmd
    Invoke-Expression -Command $cmd -Verbose
    Write-Host
    Write-Host 'Use following command to cancel: '
    Write-Host 'shutdown /a'

  • Datil
    FelipePena Jul 18, 2018 at 05:37pm

    Hmm, this is a better method than what I've used in the past.
    We created a batch file with the same shutdown command and switches and would run the batch file instead. Never thought of executing the shutdown command with the appropriate switches in the Run line of the scheduled task.
    In our instance we copied the batch file to a utility folder on each server then we'd create the scheduled task. I'm guessing with this method that you can export the scheduled task and then import it to other servers without having to copy any thing else.
    I like it. Thank you

  • Pimiento
    Roger6940 Jul 30, 2018 at 01:26am

    Thanks Scott. Simple and works great.
    The only person that can directly logon the server (in our case) is the Admin so they are the only one that can access the registry so I don't see where the security issue is that was mentioned earlier.

  • Anaheim
    Sandor7340 Apr 30, 2019 at 06:39pm

    One slight adjustment needed for 2016 and 2019

    The arguments now go into a separate box just below the Program/script box next to Add arguments optional.

  • Pimiento
    spicehead-prodigy Nov 20, 2019 at 04:58pm

    Can this solution work for Mobile computers/scanners that run on Windows, I am having intermittent server timeout issues on my Datalogic Skorpio x4 ?

  • prev
  • 1
  • 2
  • next