|
| | |||||||
| Windows XP Discuss the Microsoft Windows XP Operating System |
| | LinkBack | Thread Tools |
| |||
| MS Scheduled Task I'm having a problem with MS Scheduled Task. I'm trying to run a simple batch file via the scheduler but the DOS (Command Line) window opens then quickly closes without running the bat file. When I run the batch file manually it runs successfully. The batch file is a simple copy command and it is set up as follows: copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" I have the following set up in the Run field found in the Scheduled Task: "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" Not sure what I'm missing? |
| |||
| RE: MS Scheduled Task Insert a PAUSE command before and after your command and see what error message you are getting. The content of your batch file will look like: REM. BEGINING OF BATCH! ECHO ON PAUSE copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" PAUSE REM. END OF BATCH! And run the task through your task manager. Read the result and try to solve the problem. Let us know what happend. Good luck Mo "Wojo" wrote: > I'm having a problem with MS Scheduled Task. I'm trying to run a > simple batch file via the scheduler but the DOS (Command Line) window > opens then quickly closes without running the bat file. When I run the > batch file manually it runs successfully. The batch file is a simple > copy command and it is set up as follows: > > copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt > "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" > > I have the following set up in the Run field found in the Scheduled > Task: > > "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > Not sure what I'm missing? > > |
| |||
| Re: MS Scheduled Task "Wojo" <wojcik87******.com> wrote in message news:1164731157.300759.321950@45g2000cws.googlegro ups.com... > I'm having a problem with MS Scheduled Task. I'm trying to run a > simple batch file via the scheduler but the DOS (Command Line) window > opens then quickly closes without running the bat file. When I run the > batch file manually it runs successfully. The batch file is a simple > copy command and it is set up as follows: > > copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt > "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" > > I have the following set up in the Run field found in the Scheduled > Task: > > "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > Not sure what I'm missing? > An often used alternative to inserting "pause" statements is to run the the batch file from a Command Prompt: - Click Start / Run / cmd - Type "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" Note that mapped drives are often either visible under scheduled tasks or are inaccessible because of permission issues. |
| |||
| Re: MS Scheduled Task MPourag, That works fine when I run it manually but when I try it via the scheduler I get the same result. The Command Prompt window opens but then closes quickly without running the bat file. MPourag wrote: > Insert a PAUSE command before and after your command and see what error > message you are getting. The content of your batch file will look like: > > REM. BEGINING OF BATCH! > ECHO ON > PAUSE > copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt > "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" > PAUSE > REM. END OF BATCH! > > And run the task through your task manager. Read the result and try to solve > the problem. Let us know what happend. > > Good luck > Mo > > > "Wojo" wrote: > > > I'm having a problem with MS Scheduled Task. I'm trying to run a > > simple batch file via the scheduler but the DOS (Command Line) window > > opens then quickly closes without running the bat file. When I run the > > batch file manually it runs successfully. The batch file is a simple > > copy command and it is set up as follows: > > > > copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt > > "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" > > > > I have the following set up in the Run field found in the Scheduled > > Task: > > > > "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > Not sure what I'm missing? > > > > |
| |||
| Re: MS Scheduled Task Pegasus, I received the same result as before. When I run it manually it works fine, however, when I run it via the scheduler the Command Prompt window opens then closes before running the bat file. I did include the server name in the Run field this time around as follows but still no luck: "\\chicago\doblib\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" Pegasus (MVP) wrote: > "Wojo" <wojcik87******.com> wrote in message > news:1164731157.300759.321950@45g2000cws.googlegro ups.com... > > I'm having a problem with MS Scheduled Task. I'm trying to run a > > simple batch file via the scheduler but the DOS (Command Line) window > > opens then quickly closes without running the bat file. When I run the > > batch file manually it runs successfully. The batch file is a simple > > copy command and it is set up as follows: > > > > copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt > > "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" > > > > I have the following set up in the Run field found in the Scheduled > > Task: > > > > "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > Not sure what I'm missing? > > > > An often used alternative to inserting "pause" statements is to run > the the batch file from a Command Prompt: > - Click Start / Run / cmd > - Type "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > Note that mapped drives are often either visible under scheduled tasks > or are inaccessible because of permission issues. |
| |||
| Re: MS Scheduled Task Time to get serious. Modify your batch file like so: @echo off echo %date% %time% Start of task > c:\test.log echo User=%UserName%, Path=%path% >> c:\test.log [put your own lines of code here] echo %date% %time% End of task >> c:\test.log Now do this: 1. Run the job manually. 2. Examine c:\test.log. 3. Schedule the job. 4. Examine c:\test.log. 5. Post your version of the batch file here. 6. Post the contents of c:\test.log here. "Wojo" <wojcik87******.com> wrote in message news:1164901816.749910.82580@80g2000cwy.googlegrou ps.com... > Pegasus, > > I received the same result as before. When I run it manually it works > fine, however, > when I run it via the scheduler the Command Prompt window opens then > closes before > running the bat file. I did include the server name in the Run field > this time around as follows but still no luck: > > "\\chicago\doblib\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > Pegasus (MVP) wrote: > > "Wojo" <wojcik87******.com> wrote in message > > news:1164731157.300759.321950@45g2000cws.googlegro ups.com... > > > I'm having a problem with MS Scheduled Task. I'm trying to run a > > > simple batch file via the scheduler but the DOS (Command Line) window > > > opens then quickly closes without running the bat file. When I run the > > > batch file manually it runs successfully. The batch file is a simple > > > copy command and it is set up as follows: > > > > > > copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt > > > "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" > > > > > > I have the following set up in the Run field found in the Scheduled > > > Task: > > > > > > "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > Not sure what I'm missing? > > > > > > > An often used alternative to inserting "pause" statements is to run > > the the batch file from a Command Prompt: > > - Click Start / Run / cmd > > - Type "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > Note that mapped drives are often either visible under scheduled tasks > > or are inaccessible because of permission issues. > |
| |||
| Re: MS Scheduled Task Pegasus, Here's my version of the bat file: @echo off echo %date% %time% Start of task > c:\test.log echo User=%UserName%, Path=%path% >> c:\test.log copy \\chiprddat\murexmxgro\xfer\MurexGFX_UserAccess.tx t "\\crprdndfs01\ds_dfs\GCIB Admin\TSISAuditExtracts\ADV" copy \\chiprddat\murexmxgro\xfer\MurexGFX_GroupDesc.txt "\\crprdndfs01\ds_dfs\GCIB Admin\TSISAuditExtracts\ADV" echo %date% %time% End of task >> c:\test.log A test.log does not get created when I run it via the scheduler. Here are the contents of the log file when I run it manually: Thu 11/30/2006 16:38:44.58 Start of task User=nbkr9hh, Path=C:\WINNT\System32;\\neon\binlib\dll\sql11.1.1 \bin;\\neon\binlib\dll\sql11.1.1\dll;;C:\WINNT;C:\ WINNT\System32;\\radon\binlib\dll\sql12\OCS-12_0\dll;\\radon\binlib\dll\sql12\OCS-12_0\bin;C:\WINNT\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\lim\vbapi;c:\Program Files\Rational\Common\;c:\Program Files\Common Files\Crystal Decisions\2.5\bin\ Thu 11/30/2006 16:38:44.70 End of task Pegasus (MVP) wrote: > Time to get serious. Modify your batch file like so: > @echo off > echo %date% %time% Start of task > c:\test.log > echo User=%UserName%, Path=%path% >> c:\test.log > [put your own lines of code here] > echo %date% %time% End of task >> c:\test.log > > Now do this: > 1. Run the job manually. > 2. Examine c:\test.log. > 3. Schedule the job. > 4. Examine c:\test.log. > 5. Post your version of the batch file here. > 6. Post the contents of c:\test.log here. > > > "Wojo" <wojcik87******.com> wrote in message > news:1164901816.749910.82580@80g2000cwy.googlegrou ps.com... > > Pegasus, > > > > I received the same result as before. When I run it manually it works > > fine, however, > > when I run it via the scheduler the Command Prompt window opens then > > closes before > > running the bat file. I did include the server name in the Run field > > this time around as follows but still no luck: > > > > "\\chicago\doblib\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > Pegasus (MVP) wrote: > > > "Wojo" <wojcik87******.com> wrote in message > > > news:1164731157.300759.321950@45g2000cws.googlegro ups.com... > > > > I'm having a problem with MS Scheduled Task. I'm trying to run a > > > > simple batch file via the scheduler but the DOS (Command Line) window > > > > opens then quickly closes without running the bat file. When I run the > > > > batch file manually it runs successfully. The batch file is a simple > > > > copy command and it is set up as follows: > > > > > > > > copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt > > > > "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" > > > > > > > > I have the following set up in the Run field found in the Scheduled > > > > Task: > > > > > > > > "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > > > Not sure what I'm missing? > > > > > > > > > > An often used alternative to inserting "pause" statements is to run > > > the the batch file from a Command Prompt: > > > - Click Start / Run / cmd > > > - Type "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > Note that mapped drives are often either visible under scheduled tasks > > > or are inaccessible because of permission issues. > > |
| |||
| Re: MS Scheduled Task The log file clearly proves that the batch file runs, even though you originally thought that it did not do anything. You now have to find out why it does not do what it's supposed to do. I suspect that user nbkr9hh does not have adequate access rights to the target folder. Here is you it's done: @echo off echo %date% %time% Start of task > c:\test.log echo User=%UserName% >> c:\test.log copy \\chiprddat\murexmxgro\xfer\MurexGFX_UserAccess.tx t "\\crprdndfs01\ds_dfs\GCIB Admin\TSISAuditExtracts\ADV" 1>>c:\test.log 2>>&1 copy \\chiprddat\murexmxgro\xfer\MurexGFX_GroupDesc.txt "\\crprdndfs01\ds_dfs\GCIB Admin\TSISAuditExtracts\ADV" 1>>c:\test.log 2>>&1 echo %date% %time% End of task >> c:\test.log "Wojo" <wojcik87******.com> wrote in message news:1164926908.468955.78710@l12g2000cwl.googlegro ups.com... > Pegasus, > > Here's my version of the bat file: > > @echo off > echo %date% %time% Start of task > c:\test.log > echo User=%UserName%, Path=%path% >> c:\test.log > > copy \\chiprddat\murexmxgro\xfer\MurexGFX_UserAccess.tx t > "\\crprdndfs01\ds_dfs\GCIB Admin\TSISAuditExtracts\ADV" > > copy \\chiprddat\murexmxgro\xfer\MurexGFX_GroupDesc.txt > "\\crprdndfs01\ds_dfs\GCIB Admin\TSISAuditExtracts\ADV" > > echo %date% %time% End of task >> c:\test.log > > A test.log does not get created when I run it via the scheduler. Here > are the contents of the log file when I run it manually: > > Thu 11/30/2006 16:38:44.58 Start of task > User=nbkr9hh, > Path=C:\WINNT\System32;\\neon\binlib\dll\sql11.1.1 \bin;\\neon\binlib\dll\sql 11.1.1\dll;;C:\WINNT;C:\WINNT\System32;\\radon\bin lib\dll\sql12\OCS-12_0\dll ;\\radon\binlib\dll\sql12\OCS-12_0\bin;C:\WINNT\System32\Wbem;C:\Program > Files\Microsoft SQL Server\80\Tools\BINN;c:\lim\vbapi;c:\Program > Files\Rational\Common\;c:\Program Files\Common Files\Crystal > Decisions\2.5\bin\ > Thu 11/30/2006 16:38:44.70 End of task > > Pegasus (MVP) wrote: > > Time to get serious. Modify your batch file like so: > > @echo off > > echo %date% %time% Start of task > c:\test.log > > echo User=%UserName%, Path=%path% >> c:\test.log > > [put your own lines of code here] > > echo %date% %time% End of task >> c:\test.log > > > > Now do this: > > 1. Run the job manually. > > 2. Examine c:\test.log. > > 3. Schedule the job. > > 4. Examine c:\test.log. > > 5. Post your version of the batch file here. > > 6. Post the contents of c:\test.log here. > > > > > > "Wojo" <wojcik87******.com> wrote in message > > news:1164901816.749910.82580@80g2000cwy.googlegrou ps.com... > > > Pegasus, > > > > > > I received the same result as before. When I run it manually it works > > > fine, however, > > > when I run it via the scheduler the Command Prompt window opens then > > > closes before > > > running the bat file. I did include the server name in the Run field > > > this time around as follows but still no luck: > > > > > > "\\chicago\doblib\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > Pegasus (MVP) wrote: > > > > "Wojo" <wojcik87******.com> wrote in message > > > > news:1164731157.300759.321950@45g2000cws.googlegro ups.com... > > > > > I'm having a problem with MS Scheduled Task. I'm trying to run a > > > > > simple batch file via the scheduler but the DOS (Command Line) window > > > > > opens then quickly closes without running the bat file. When I run the > > > > > batch file manually it runs successfully. The batch file is a simple > > > > > copy command and it is set up as follows: > > > > > > > > > > copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt > > > > > "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" > > > > > > > > > > I have the following set up in the Run field found in the Scheduled > > > > > Task: > > > > > > > > > > "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > > > > > Not sure what I'm missing? > > > > > > > > > > > > > An often used alternative to inserting "pause" statements is to run > > > > the the batch file from a Command Prompt: > > > > - Click Start / Run / cmd > > > > - Type "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > > > Note that mapped drives are often either visible under scheduled tasks > > > > or are inaccessible because of permission issues. > > > > |
| |||
| Re: MS Scheduled Task Pegasus, I do get the following test.log after moving the bat file to my C drive. As I mentioned earlier a test.log is not created when the bat file is located on the network: Thu 11/30/2006 17:11:24.58 Start of task User=nbkr9hh, Path=\\neon\binlib\dll\sql11.1.1\bin;\\neon\binlib \dll\sql11.1.1\dll;;C:\WINNT;C:\WINNT\System32;\\r adon\binlib\dll\sql12\OCS-12_0\dll;\\radon\binlib\dll\sql12\OCS-12_0\bin;C:\WINNT\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\lim\vbapi;c:\Program Files\Rational\Common\;c:\Program Files\Common Files\Crystal Decisions\2.5\bin\ Thu 11/30/2006 17:11:24.72 End of task Wojo wrote: > Pegasus, > > Here's my version of the bat file: > > @echo off > echo %date% %time% Start of task > c:\test.log > echo User=%UserName%, Path=%path% >> c:\test.log > > copy \\chiprddat\murexmxgro\xfer\MurexGFX_UserAccess.tx t > "\\crprdndfs01\ds_dfs\GCIB Admin\TSISAuditExtracts\ADV" > > copy \\chiprddat\murexmxgro\xfer\MurexGFX_GroupDesc.txt > "\\crprdndfs01\ds_dfs\GCIB Admin\TSISAuditExtracts\ADV" > > echo %date% %time% End of task >> c:\test.log > > A test.log does not get created when I run it via the scheduler. Here > are the contents of the log file when I run it manually: > > Thu 11/30/2006 16:38:44.58 Start of task > User=nbkr9hh, > Path=C:\WINNT\System32;\\neon\binlib\dll\sql11.1.1 \bin;\\neon\binlib\dll\sql11.1.1\dll;;C:\WINNT;C:\ WINNT\System32;\\radon\binlib\dll\sql12\OCS-12_0\dll;\\radon\binlib\dll\sql12\OCS-12_0\bin;C:\WINNT\System32\Wbem;C:\Program > Files\Microsoft SQL Server\80\Tools\BINN;c:\lim\vbapi;c:\Program > Files\Rational\Common\;c:\Program Files\Common Files\Crystal > Decisions\2.5\bin\ > Thu 11/30/2006 16:38:44.70 End of task > > Pegasus (MVP) wrote: > > Time to get serious. Modify your batch file like so: > > @echo off > > echo %date% %time% Start of task > c:\test.log > > echo User=%UserName%, Path=%path% >> c:\test.log > > [put your own lines of code here] > > echo %date% %time% End of task >> c:\test.log > > > > Now do this: > > 1. Run the job manually. > > 2. Examine c:\test.log. > > 3. Schedule the job. > > 4. Examine c:\test.log. > > 5. Post your version of the batch file here. > > 6. Post the contents of c:\test.log here. > > > > > > "Wojo" <wojcik87******.com> wrote in message > > news:1164901816.749910.82580@80g2000cwy.googlegrou ps.com... > > > Pegasus, > > > > > > I received the same result as before. When I run it manually it works > > > fine, however, > > > when I run it via the scheduler the Command Prompt window opens then > > > closes before > > > running the bat file. I did include the server name in the Run field > > > this time around as follows but still no luck: > > > > > > "\\chicago\doblib\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > Pegasus (MVP) wrote: > > > > "Wojo" <wojcik87******.com> wrote in message > > > > news:1164731157.300759.321950@45g2000cws.googlegro ups.com... > > > > > I'm having a problem with MS Scheduled Task. I'm trying to run a > > > > > simple batch file via the scheduler but the DOS (Command Line) window > > > > > opens then quickly closes without running the bat file. When I run the > > > > > batch file manually it runs successfully. The batch file is a simple > > > > > copy command and it is set up as follows: > > > > > > > > > > copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt > > > > > "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" > > > > > > > > > > I have the following set up in the Run field found in the Scheduled > > > > > Task: > > > > > > > > > > "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > > > > > Not sure what I'm missing? > > > > > > > > > > > > > An often used alternative to inserting "pause" statements is to run > > > > the the batch file from a Command Prompt: > > > > - Click Start / Run / cmd > > > > - Type "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > > > Note that mapped drives are often either visible under scheduled tasks > > > > or are inaccessible because of permission issues. > > > |
| |||
| Re: MS Scheduled Task Locating the batch file on the network is not a good idea - the task might not be able to access it because of insufficient access rights. "Wojo" <wojcik87******.com> wrote in message news:1164928515.047517.64470@f1g2000cwa.googlegrou ps.com... > Pegasus, > > I do get the following test.log after moving the bat file to my C > drive. As I mentioned earlier a test.log > is not created when the bat file is located on the network: > > Thu 11/30/2006 17:11:24.58 Start of task > User=nbkr9hh, > Path=\\neon\binlib\dll\sql11.1.1\bin;\\neon\binlib \dll\sql11.1.1\dll;;C:\WIN NT;C:\WINNT\System32;\\radon\binlib\dll\sql12\OCS-12_0\dll;\\radon\binlib\dl l\sql12\OCS-12_0\bin;C:\WINNT\System32\Wbem;C:\Program > Files\Microsoft SQL Server\80\Tools\BINN;c:\lim\vbapi;c:\Program > Files\Rational\Common\;c:\Program Files\Common Files\Crystal > Decisions\2.5\bin\ > Thu 11/30/2006 17:11:24.72 End of task > > > Wojo wrote: > > Pegasus, > > > > Here's my version of the bat file: > > > > @echo off > > echo %date% %time% Start of task > c:\test.log > > echo User=%UserName%, Path=%path% >> c:\test.log > > > > copy \\chiprddat\murexmxgro\xfer\MurexGFX_UserAccess.tx t > > "\\crprdndfs01\ds_dfs\GCIB Admin\TSISAuditExtracts\ADV" > > > > copy \\chiprddat\murexmxgro\xfer\MurexGFX_GroupDesc.txt > > "\\crprdndfs01\ds_dfs\GCIB Admin\TSISAuditExtracts\ADV" > > > > echo %date% %time% End of task >> c:\test.log > > > > A test.log does not get created when I run it via the scheduler. Here > > are the contents of the log file when I run it manually: > > > > Thu 11/30/2006 16:38:44.58 Start of task > > User=nbkr9hh, > > Path=C:\WINNT\System32;\\neon\binlib\dll\sql11.1.1 \bin;\\neon\binlib\dll\sql 11.1.1\dll;;C:\WINNT;C:\WINNT\System32;\\radon\bin lib\dll\sql12\OCS-12_0\dll ;\\radon\binlib\dll\sql12\OCS-12_0\bin;C:\WINNT\System32\Wbem;C:\Program > > Files\Microsoft SQL Server\80\Tools\BINN;c:\lim\vbapi;c:\Program > > Files\Rational\Common\;c:\Program Files\Common Files\Crystal > > Decisions\2.5\bin\ > > Thu 11/30/2006 16:38:44.70 End of task > > > > Pegasus (MVP) wrote: > > > Time to get serious. Modify your batch file like so: > > > @echo off > > > echo %date% %time% Start of task > c:\test.log > > > echo User=%UserName%, Path=%path% >> c:\test.log > > > [put your own lines of code here] > > > echo %date% %time% End of task >> c:\test.log > > > > > > Now do this: > > > 1. Run the job manually. > > > 2. Examine c:\test.log. > > > 3. Schedule the job. > > > 4. Examine c:\test.log. > > > 5. Post your version of the batch file here. > > > 6. Post the contents of c:\test.log here. > > > > > > > > > "Wojo" <wojcik87******.com> wrote in message > > > news:1164901816.749910.82580@80g2000cwy.googlegrou ps.com... > > > > Pegasus, > > > > > > > > I received the same result as before. When I run it manually it works > > > > fine, however, > > > > when I run it via the scheduler the Command Prompt window opens then > > > > closes before > > > > running the bat file. I did include the server name in the Run field > > > > this time around as follows but still no luck: > > > > > > > > "\\chicago\doblib\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > > > Pegasus (MVP) wrote: > > > > > "Wojo" <wojcik87******.com> wrote in message > > > > > news:1164731157.300759.321950@45g2000cws.googlegro ups.com... > > > > > > I'm having a problem with MS Scheduled Task. I'm trying to run a > > > > > > simple batch file via the scheduler but the DOS (Command Line) window > > > > > > opens then quickly closes without running the bat file. When I run the > > > > > > batch file manually it runs successfully. The batch file is a simple > > > > > > copy command and it is set up as follows: > > > > > > > > > > > > copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt > > > > > > "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" > > > > > > > > > > > > I have the following set up in the Run field found in the Scheduled > > > > > > Task: > > > > > > > > > > > > "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > > > > > > > Not sure what I'm missing? > > > > > > > > > > > > > > > > An often used alternative to inserting "pause" statements is to run > > > > > the the batch file from a Command Prompt: > > > > > - Click Start / Run / cmd > > > > > - Type "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > > > > > Note that mapped drives are often either visible under scheduled tasks > > > > > or are inaccessible because of permission issues. > > > > > |
| |||
| Re: MS Scheduled Task Pegasus, You rock! It worked by locating the batch file on my C drive. Thanks Pegasus (MVP) wrote: > Locating the batch file on the network is not a good > idea - the task might not be able to access it because > of insufficient access rights. > > > "Wojo" <wojcik87******.com> wrote in message > news:1164928515.047517.64470@f1g2000cwa.googlegrou ps.com... > > Pegasus, > > > > I do get the following test.log after moving the bat file to my C > > drive. As I mentioned earlier a test.log > > is not created when the bat file is located on the network: > > > > Thu 11/30/2006 17:11:24.58 Start of task > > User=nbkr9hh, > > > Path=\\neon\binlib\dll\sql11.1.1\bin;\\neon\binlib \dll\sql11.1.1\dll;;C:\WIN > NT;C:\WINNT\System32;\\radon\binlib\dll\sql12\OCS-12_0\dll;\\radon\binlib\dl > l\sql12\OCS-12_0\bin;C:\WINNT\System32\Wbem;C:\Program > > Files\Microsoft SQL Server\80\Tools\BINN;c:\lim\vbapi;c:\Program > > Files\Rational\Common\;c:\Program Files\Common Files\Crystal > > Decisions\2.5\bin\ > > Thu 11/30/2006 17:11:24.72 End of task > > > > > > Wojo wrote: > > > Pegasus, > > > > > > Here's my version of the bat file: > > > > > > @echo off > > > echo %date% %time% Start of task > c:\test.log > > > echo User=%UserName%, Path=%path% >> c:\test.log > > > > > > copy \\chiprddat\murexmxgro\xfer\MurexGFX_UserAccess.tx t > > > "\\crprdndfs01\ds_dfs\GCIB Admin\TSISAuditExtracts\ADV" > > > > > > copy \\chiprddat\murexmxgro\xfer\MurexGFX_GroupDesc.txt > > > "\\crprdndfs01\ds_dfs\GCIB Admin\TSISAuditExtracts\ADV" > > > > > > echo %date% %time% End of task >> c:\test.log > > > > > > A test.log does not get created when I run it via the scheduler. Here > > > are the contents of the log file when I run it manually: > > > > > > Thu 11/30/2006 16:38:44.58 Start of task > > > User=nbkr9hh, > > > > Path=C:\WINNT\System32;\\neon\binlib\dll\sql11.1.1 \bin;\\neon\binlib\dll\sql > 11.1.1\dll;;C:\WINNT;C:\WINNT\System32;\\radon\bin lib\dll\sql12\OCS-12_0\dll > ;\\radon\binlib\dll\sql12\OCS-12_0\bin;C:\WINNT\System32\Wbem;C:\Program > > > Files\Microsoft SQL Server\80\Tools\BINN;c:\lim\vbapi;c:\Program > > > Files\Rational\Common\;c:\Program Files\Common Files\Crystal > > > Decisions\2.5\bin\ > > > Thu 11/30/2006 16:38:44.70 End of task > > > > > > Pegasus (MVP) wrote: > > > > Time to get serious. Modify your batch file like so: > > > > @echo off > > > > echo %date% %time% Start of task > c:\test.log > > > > echo User=%UserName%, Path=%path% >> c:\test.log > > > > [put your own lines of code here] > > > > echo %date% %time% End of task >> c:\test.log > > > > > > > > Now do this: > > > > 1. Run the job manually. > > > > 2. Examine c:\test.log. > > > > 3. Schedule the job. > > > > 4. Examine c:\test.log. > > > > 5. Post your version of the batch file here. > > > > 6. Post the contents of c:\test.log here. > > > > > > > > > > > > "Wojo" <wojcik87******.com> wrote in message > > > > news:1164901816.749910.82580@80g2000cwy.googlegrou ps.com... > > > > > Pegasus, > > > > > > > > > > I received the same result as before. When I run it manually it > works > > > > > fine, however, > > > > > when I run it via the scheduler the Command Prompt window opens then > > > > > closes before > > > > > running the bat file. I did include the server name in the Run field > > > > > this time around as follows but still no luck: > > > > > > > > > > "\\chicago\doblib\Tech&Ops\Scheduled Tasks\Report > Output\MurexGFX.bat" > > > > > > > > > > Pegasus (MVP) wrote: > > > > > > "Wojo" <wojcik87******.com> wrote in message > > > > > > news:1164731157.300759.321950@45g2000cws.googlegro ups.com... > > > > > > > I'm having a problem with MS Scheduled Task. I'm trying to run a > > > > > > > simple batch file via the scheduler but the DOS (Command Line) > window > > > > > > > opens then quickly closes without running the bat file. When I > run the > > > > > > > batch file manually it runs successfully. The batch file is a > simple > > > > > > > copy command and it is set up as follows: > > > > > > > > > > > > > > copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt > > > > > > > "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" > > > > > > > > > > > > > > I have the following set up in the Run field found in the > Scheduled > > > > > > > Task: > > > > > > > > > > > > > > "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > > > > > > > > > Not sure what I'm missing? > > > > > > > > > > > > > > > > > > > An often used alternative to inserting "pause" statements is to > run > > > > > > the the batch file from a Command Prompt: > > > > > > - Click Start / Run / cmd > > > > > > - Type "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > > > > > > > Note that mapped drives are often either visible under scheduled > tasks > > > > > > or are inaccessible because of permission issues. > > > > > > > |
| |||
| Re: MS Scheduled Task THANK YOU! I had a similar issue, and you're advice saved my night. Cheers to you! Brandon Wojo wrote: > Pegasus, > > I received the same result as before. When I run it manually it works > fine, however, > when I run it via the scheduler the Command Prompt window opens then > closes before > running the bat file. I did include the server name in the Run field > this time around as follows but still no luck: > > "\\chicago\doblib\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > Pegasus (MVP) wrote: > > "Wojo" <wojcik87******.com> wrote in message > > news:1164731157.300759.321950@45g2000cws.googlegro ups.com... > > > I'm having a problem with MS Scheduled Task. I'm trying to run a > > > simple batch file via the scheduler but the DOS (Command Line) window > > > opens then quickly closes without running the bat file. When I run the > > > batch file manually it runs successfully. The batch file is a simple > > > copy command and it is set up as follows: > > > > > > copy \\chicago\murexmxgro\xfer\MurexGFX_UserAccess.txt > > > "\\newyork\ds_dfs\GCIB Admin\TSISAuditExtracts\MurexGFX" > > > > > > I have the following set up in the Run field found in the Scheduled > > > Task: > > > > > > "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > > > Not sure what I'm missing? > > > > > > > An often used alternative to inserting "pause" statements is to run > > the the batch file from a Command Prompt: > > - Click Start / Run / cmd > > - Type "P:\Tech&Ops\Scheduled Tasks\Report Output\MurexGFX.bat" > > > > Note that mapped drives are often either visible under scheduled tasks > > or are inaccessible because of permission issues. |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Scheduled task | Victor | Windows XP | 1 | 12-06-2008 12:20 PM |
| Scheduled task every day | Michele | Windows XP | 1 | 01-14-2008 06:30 AM |
| What happens if a scheduled task is scheduled to start, but theprevious task execution is still running? | joe.carr@gmail.com | Windows XP | 1 | 12-17-2007 11:40 AM |
| How to Read Scheduled Task Last Result from Registry for a task | Sakthi | Windows XP | 1 | 07-19-2007 10:50 PM |
| Scheduled Task gone mad | Prob | Windows XP | 16 | 01-04-2007 03:12 AM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |