Announcement

Collapse
No announcement yet.

Scheduled task did not run

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scheduled task did not run

    I have a .cmd file in c:\ that is scheduled to run every night and copy some files from an Server 2008 Standard server to a folder on our SBS 2003 server.

    The task scheduler on Server 2008 indicates the task ran, however, the files are not copied over. I can run the task manually from the task scheduler and it works fine.

    The task is run as 'domain administrator' and the button is checked to run this task even if the administrator is not logged on. The Server 2008 server is a member server of the SBS 2003 network.
    Network Engineers do IT under the desk

  • #2
    Re: Scheduled task did not run

    Originally posted by RobW View Post
    I have a .cmd file in c:\ that is scheduled to run every night and copy some files from an Server 2008 Standard server to a folder on our SBS 2003 server.
    You do not want to do file copying as a domain admin. Seriously, a domain admin account is way too powerful for such a routine work.

    A best practice is to create an account with limited rights (domain user is usually good enough) that can read & write the shares. Name the account SVCWhateverItDoes (SVC=service), prevent password change and set the password to never expire mode. Assign complex enough a password while you are at it.

    As running batch jobs requires the logon as batch job right, you need to assign such a right in the domain security policy for it.

    The standard way to debug scheduled tasks is to launch a cmd box as the service account. Use the runas command. Usually, the problems are related to access control.

    You could insert some logging statements into the copy script too. Use >> to redirect command output to a log file.

    -vP

    Comment


    • #3
      Re: Scheduled task did not run

      Thanks for the reply. I noticed on the Server 2008 member server, the domain administrator did not have permission to log on as a batch file, only the local administrator. I made the wrong assumption that just because the server was a member server, the administrator could run bach files.

      Concerning the actual batch file itself, it has always worked fine whether in a command window or manually from the Task Manager. I am waiting to see what happens when it runs again on Monday night.
      Network Engineers do IT under the desk

      Comment

      Working...
      X