Robocopy and the MOT switch for scheduled jobs

Posted on 2005-04-20
Last Modified: 2011-10-03
We are planning on using robocopy to copy the contents of an entire directory from one server to another but it must be run once a day at 10 PM.  I have looked into the MOT switch but I have two questions:

1. How can I make robocopy run at 10 PM exactly?  The MOT switch identifies the minimum time in minutes that must elapse before running again.  In order to accomplish this do I have to start robocopy at 10 PM and then set the /MOT:m value to 1440?  I saw something on using the /RH switch, but how exactly would we implement it for our purpose?

2. What if the server is rebooted?  Does robocopy start up automatically?  I doubt it, so how do I ensure my special robocopy.exe command is started every 24 hours?

Question by:djs120
    LVL 82

    Accepted Solution

    To run it at 10 exactly, and to make sure it continues to run after a reboot, it's best to use the task scheduler.
    Either do it with the "GUI" task scheduler, where you can specify an account to run the command (to provide the network credentials), or use "at.exe" from the command line. If in doubt, I prefer the latter one, it's somewhat more reliable.
    For this to work with at.exe, you need a small batch script (which should be put into a folder secured with NTFS permissions to allow only administrators access, as you need to specify a password in it):

    net use \\OtherServer\IPC$ password /user:SomeDomain\SomeUser
    robocopy T:\hisS\erver \\OtherServer\SomeShare ...
    net use \\OtherServer\IPC$ /delete

    the at command should be something like
    at 10:00pm /every:m,t,w,th,f,s,su C:\Secure\folder\robocopy-script.cmd

    (Don't rely on me with the time format, I'm using military time ...)
    LVL 1

    Author Comment

    Thanks, the task scheduler is where it's at.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
    I guess it is not common knowledge to most Wintel engineers/administrators: If you have an SNMP-based monitoring system in your environment (and it's common to have SNMP or Syslog) it's reasonably easy to enable monitoring of the Windows Event logs,…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now