Script runs fine except when scheduled???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PhilE
    Visitor
    • Dec 2003
    • 5

    Script runs fine except when scheduled???

    I can run a sync of a network drive to my local drive. I have created a script that does this and it runs fine when I run it. As soon as I schedule it and do a test run in scheduler BC spools up for exactly 59 seconds then dies.

    Here is a copy of the log:
    12/31/2003 12:41:39 AM >> log normal "D:\Logs\Synclog10.txt"
    12/31/2003 12:41:39 AM >> # Load the default session
    12/31/2003 12:41:39 AM >> # load "AdminBackup"
    12/31/2003 12:41:39 AM >> # Exclude certain file types
    12/31/2003 12:41:39 AM >>
    12/31/2003 12:41:39 AM >> # Load the base folders
    12/31/2003 12:41:39 AM >> load "D:\" "G:\"
    12/31/2003 12:41:39 AM Load Comparison: D:\ <->
    12/31/2003 12:42:09 AM >> expand all
    12/31/2003 12:42:19 AM >> # Copy all files from Local folder
    12/31/2003 12:42:19 AM >> select lt.newer.files lt.diff.files lt.orphan
    12/31/2003 12:42:20 AM >> option confirm:yes-to-all
    12/31/2003 12:42:20 AM >> copy lt->rt

    Note that even with the Load "AdminBackup" working it fails the same way. Note that the Load Comparison's right side is blank. This is supposed to be the network drive. Again, works when I start the program or the script. It dies when scheduled.

    Thanks,

    Phil.
  • Zoë
    Team Scooter
    • Oct 2007
    • 2666

    #2
    Re: Script runs fine except when scheduled???

    If you haven't, you should add /silent to your tasks command line so it won't try showing the scripting window. v2.1 handles that automatically, but v2.0 doesn't, and that can cause a hang.

    You may also need to set the "Run As User" option to run the task under your login rather than the default one.

    As for G:\ not getting detected, you may need to connect it manually before running the script. I'm not sure of the specifics, but you could try running a batch file instead, and use Windows' "NET USE" commands to make sure the drive is connected.

    It might be worth trying the 2.1 beta too. It should do a bit better a job of connecting to network drives, and it has better error handling when one of the base folders doesn't load.
    Zoë P Scooter Software

    Comment

    • PhilE
      Visitor
      • Dec 2003
      • 5

      #3
      Re: Script runs fine except when scheduled???

      I can run a scheduled compare and copy on any share accept this one. I haven't had to use the silent switch as the script window does not pop up when it is running.
      I am connecting to a new Windows 2003 Server share. This is the only difference!
      The other shares that we are connecting to are on XP Pro or Windows 2000 with no difficulties...
      Here's a little more of the log file:

      1/7/2004 9:13:14 PM >> log normal "D:\Logs\Synclog10.txt"
      1/7/2004 9:13:14 PM >> # Load the default session
      1/7/2004 9:13:14 PM >> # load "AdminBackup"
      1/7/2004 9:13:14 PM >> # Exclude certain file types
      1/7/2004 9:13:14 PM >>
      1/7/2004 9:13:14 PM >> # Load the base folders
      1/7/2004 9:13:14 PM >> load "D:\" "G:\"
      1/7/2004 9:13:14 PM <font color="yellow">Load Comparison: D:\ <-></font>
      1/7/2004 9:13:14 PM >> expand all
      1/7/2004 9:13:58 PM >> # Copy all files from Local folder
      1/7/2004 9:13:58 PM >> select lt.newer.files lt.diff.files lt.orphan
      1/7/2004 9:14:00 PM >> option confirm:yes-to-all
      1/7/2004 9:14:00 PM >> copy lt->rt
      1/7/2004 9:14:02 PM Nil Container: Operation not supported.
      1/7/2004 9:14:02 PM Unable to create ADDB
      1/7/2004 9:14:02 PM Nil Container: Operation not supported.
      1/7/2004 9:14:02 PM Unable to create ADDB
      1/7/2004 9:14:02 PM Nil Container: Operation not supported.
      1/7/2004 9:14:02 PM Unable to create ADDB
      1/7/2004 9:14:02 PM Nil Container: Operation not supported.
      1/7/2004 9:14:02 PM Unable to create ADDB
      1/7/2004 9:14:02 PM Nil Container: Operation not supported.
      1/7/2004 9:14:02 PM Unable to create ADDB
      1/7/2004 9:14:02 PM Read-only container: unable to perform operation
      1/7/2004 9:14:02 PM Read-only container: unable to perform operation
      1/7/2004 9:14:02 PM Read-only container: unable to perform operation
      1/7/2004 9:14:02 PM Nil Container: Operation not supported.
      1/7/2004 9:14:02 PM Unable to create Company Shared Folders
      1/7/2004 9:14:02 PM Nil Container: Operation not supported.
      1/7/2004 9:14:02 PM Unable to create Company Shared Folders
      1/7/2004 9:14:02 PM Nil Container: Operation not supported.
      1/7/2004 9:14:02 PM Unable to create Company Shared Folders

      That unable to create goes on for over 1 MB before the program cuts out.

      Note that in yellow the share drive comes up blank. I have opened all available permissions and ran the effective permissions test in 2003 and all groups show access. The login and password in the scheduler belong to the Domain Admin.

      I can open and create folders on the share through Explorer.

      I am stumped!

      Phil.

      Comment

      • PhilE
        Visitor
        • Dec 2003
        • 5

        #4
        Re: Script runs fine except when scheduled???

        Ok,

        Installed 2.1 and I get a G:\ does not exist error.

        This is when I run the script from the scheduler with the administrator's login and password.

        The script will run OK if I run it from the GUI by clicking on the shortcut.

        Net Use shows the G:\ as existing!

        Any clues?

        Thanks for your time,

        Phil.

        Comment

        • PhilE
          Visitor
          • Dec 2003
          • 5

          #5
          Re: Script runs fine except when scheduled???

          Got it.
          Following your directions I created a batch file that deleted the share, then created it again with the Net Use command then ran the BC2 script from within the batch file as well.
          Task scheduler runs it fine now!
          A little bizarre!
          Phil.

          Comment

          Working...