Batch file not working with Scheduler

I have written a simple batch file which copies contents of one directory to another directory on second server. Both the servers are Windows 2008 R2 and are member servers in the same domain. It is a simple .bat file which copies contents to another folder
which is mounted as a network drive . 
This script when I run it from COmmand Prompt window, it works file. But If I schedule it run at a particular time, it does not run. The scheduler starts the batch file and within a second reports it as complete. The copy does not happen.
I have also tried robocopy command instead of xcopy. But same result.  It works from the command prompt but scheduler cannot run it. But there is no error reported by scheduler.  e.g. task triggrred 11:43:15  completed 11:43:15. 
Any suggestions? Inputs?
From :
shekhar-nsk

Hi Shekhar,
I don't think this issue is related to your script. If you run any other simple script then also you may face the same issue.If yes,
1) Make sure you are using appropriate credential on task schedular. Change User Or Group if require.
2) Try to run task with "Run with highest privileges"
3) Ensure you gave the arguments and parameters properly without missing even quotes.
Can refer below link for more information on scheduling a PS script and replace the same per your requirement for batch file (.bat).
https://social.technet.microsoft.com/Forums/windowsserver/en-US/43e19576-476d-4735-85ef-c508c18f11e8/executing-powershell-scripts-via-task-scheduler
Please remember to mark your question as answered & Vote helpful,if this solves/helps your problem.
Best Regards,
Pavan Kumar Sapara
s p kumar

Similar Messages

  • SQL 2008 Agent - run batch file not working

    Hello,
    I am having some strange issues with a batch file running out of SQL agent I'm hoping I can get some help with.
    The batch file's purpose is to send some log files to a SFTP server.
    The job has been working great for the past 3 weeks, however this morning it stopped working. The job doesn't error out, however the entire job completes in 00:00:00 duration and I'm given the following message 
    Date 4/7/2014 3:38:00 PM
    Log Job History (***Log Transfer)
    Step ID 1
    Server *******
    Job Name **** Log Transfer
    Step Name run batch
    Duration 00:00:00
    Sql Severity 0
    Sql Message ID 0
    Operator Emailed
    Operator Net sent
    Operator Paged
    Retries Attempted 0
    Message
    Executed as user: USERNAMERemoved . The step did not generate any output.  Process Exit Code 0.  The step succeeded.
    The batch file looks like 
    echo  *********************************
    echo  ** JOB EXECUTED %date% %time%  ** 
    if %errorlevel% neq 0 exit /b
    C:
    cd "C:\Program Files (x86)\WinSCP"
    winscp /console /script=G:\Batch\LogTransfer.txt
    call G:\Batch\LogTransfer2.bat
    echo ** COMPLETED %date% %time%  ** 
    echo  *********************************
    I have numerous other batch jobs running on this server, no other job has had this issue.  I have deleted and recreated both the job step and the entire job.  I have recreated the batch files from scratch.   I have also deleted the entire
    contents of the batch file and just simply put in echo **** and still received the message so I'm near positive it has nothing to do with the actual batch file.  
    I have reset SQL Agent, as well rechecked that the SQL Agent account has run batch rights granted to it.
    I moved the batch files to another folder, and they worked for about 4 runs until the same issue happened!!!
    The job does execute 100% perfect if I run it manually via batch or if I kick it off starting the job out of SQL.
    I am out of options here, does anyone have any ideas that could help me out?
    Thanks,
    Ryan

    Hello,
    Try to edit the step, and on the Advanced page of that step try to configure the job to create a log on the location you specify (Output file). Try to run the step again and examine the log created.
    Could you try to change the owner of the job to “sa” or to your Windows account? Maybe the SQL Server Agent account does not have access
    to the following folders:
    G:\Batch\
    C:\Program Files (x86)\WinSCP
    Alternatively, you can try to create a proxy account.
    http://technet.microsoft.com/en-US/library/ms190698(v=SQL.105).aspx
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Reading the EDI X12 file not working with the patch 8233048

    Hi
    I have installed the latest path 8233048 on my windowsXP system, now I am not able to see the File being polled and processed.
    In b2b.log I can see the last message as "oracle.tip.adapter.b2b.data.MsgListener:run start listening on message" after that no log.
    In b2b_dc_transport.log, I can see only
    2009.02.07 at 20:35:45:236: B2BStarter thread: (DEBUG) TransportProperties.TransportProperties():http.receiver.registry_port=5110;smtp.receiver.protocol=imap;PROTOCOL_ENDPOINT=null;file.receiver.polling_interval=30;polling_interval=30;http.receiver.instance_name=IP;
    2009.02.07 at 20:35:45:266: B2BStarter thread: (DEBUG) initialize TransportReceiver: [IRIS_Transport_Server < file > < IRIS >]
    2009.02.07 at 20:35:45:266: B2BStarter thread: (DEBUG) FileReceiver.init() started ....
    2009.02.07 at 20:35:45:287: B2BStarter thread: (DEBUG) FileReceiver.init() completed.
    Could you please tell me if I need to do any changes.
    This is working on b2b with only patch: 5907304 which is installed in another windows XP system.
    The same configuration with the latest patch is not working.
    Edited by: Praveena Paruchuru on Mar 7, 2009 7:56 AM

    Hi Dheeraj,
    I have restarted my system many times, not only B2B.
    I have taken the print out of both the tip.properties and compared line by line and wanted to check out which line was making it not to function.
    I added the mismatching lines one by one by one, it was working for all teh updates. Finally I changed it to my new tip.properties.
    Then surprisingly it is working.

  • FCP Quicktime movie files not working with iDVD

    I have been using iDVD for years with no issues. Now, whenever I export a QT file from FCP 7 and use it in iDVD, I get a blank screen with audio and no video.
    I am able to work around the problem by using "Export Using Qucktime Conversion" and creating a smaller file, but I've never had to do that before. What in the world am I missing here? Shouldn't I be able to export as a QT movie, as long as the file is not gigantic? (the most recent one I used and had this problem occur was only about 500mb). Thanks for any help...
    Ben

    Hmmm,
    Well this is helpful information but unfortunately didn't solve my problem. The movie in question is only 5 1/2 minutes long. When I export it as a QT movie, iDVD "acts" like everything is fine; I can preview it within iDVD, etc.But when I burn the disc, it comes out blank. I then went back to FCP and exported it using QT conversion, and the DVD burned just fine. (I exclusively use Taiyo Yuden media and have never had a bad disc).
    This is just a simple 16:9 movie, shot at 720/30p on a Canon DSLR. I ingested with Log and Transfer using ProRes422, then dropped it onto the timeline, added a music track, rendered, and exported as Quicktime movie. It looks great on my desktop using the QT player, but it simply will not work in iDVD.  Still stuck here...
    Ben

  • .psd file not working with Motion 5

    I have a .psd that doesn't want to work with Motion 5.  Every time I try and import it, Motion says that it's not a valid codec.  I can't figurt out what's going on, all my other .psd files seem to work.
    Yes, I'm using RGB colors not CMYK (that is the onne known issue thus far).
    I'm just totally at a lose.  Here's what the console says, if anyone has any insight, I woudl appreciate it:
    6/27/11 1:12:55 PM          [0x0-0xb50b5].com.apple.motionapp[1326]          CPSDSlicesResourceItem::Load(): unsupported slice resource item version (8)
    6/27/11 1:12:55 PM          Motion[1326]          -[ProPSDImageRef initWithPath:] - WARNING - invalid or nonexistent file at /Users/compy/Desktop/PostAppointmetVideo/Corrolary Projects/mockup.psd. Image ref not created.

    I'd be happy to email one of them to you if you'd like.  Or give it to you in some fashion at any rate.  I'm not seeing this problem pop up anywhere else on the internet, so I'm guessing it's just me.  But it would be nice to check with another motion user.
    Email me at jay <no space, just keeping the bots guessing> carr <at> gmail <I'm sure you can guess> com.
    It certainly would be nice to see what happens when I give it to you.  I'm having some very significant issues with PDFs and can't figure out why...

  • Empty Temporary Internet Files not working with IE9

    Hey everyone.  I have an issue in my domain environment where the "Empty Temporary Internet files folder when browser is closed" is enabled but not actually working for pc's that have IE9.  
    I have configured this policy in both Computer Config and User Config on separate occasions to see if it would work but it just doesn't for users IE9.  My domain is still a Server 2003 domain and I manage group policy through the RSAT Tool Group Policy
    Management on my machine.  All machines in my environment are Windows 7 x64 with IE9 except for a few with IE11.  The funny thing is the computers with IE11 (like myself) the GPO works great.  The temporary files get
    flushed whenever I close my browser.  Unfortunately everyone with IE9 the settings say they are applied but they do not work.  I was wondering if it had something to do with the inetres.admx files on my pc since I use IE11.  Anyone have any
    ideas why the policy would only work for IE11 browsers instead of all browsers? 
    The temporary IE folders are in the default locations and I noticed that the IE9 users can't navigate to the content.ie5 directory as well.  When entering content.ie5 in path they can get to it and when clicking on the random directory's it prompts you
    with a windows security warning.  
    Any help or guidance would be great. Thanks!
    ----E----

    Hi,
    Based on the decription, we can try to enable the following policy setting to see if it helps:
    Computer configuration or User Configuration\Policies\Administrative Templates\Windows Components\Internet Explorer\Delete Browsing History\Allow deleting browsing history on exit 
    Regarding this point, the following thread can be referred to for more information.
    Empty Temporary Internet Files Folder when brower is close does not work in windows 7 X64
    https://social.technet.microsoft.com/Forums/en-US/f48d22f7-d46f-40ce-bc40-04b7d3a05405/empty-temporary-internet-files-folder-when-brower-is-close-does-not-work-in-windows-7-x64?forum=w7itproinstall
    Best regards,
    Frank Shen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Startup batch file not working on WinXP S.P.2

    I have Oracle database release 10.1.0.2.0. And until recently, it started up and shut down easily from 2 batch files that I used. Luckily, although they don't work now, I can still open Oracle by using the [ Administration Tools | Services ] tabs and manually start the required services. When I click on my startupOracle.bat file now - the dos window that appears seems to zoom by so fast - and nothing gets started. So, of course, I'm relieved that I can still operate
    Oracle software. I'm wondering if the fact that the batch files aren't working is a symptom of another ( general computer ) problem I might have. Here is the startup batch file which used to work , but not now
    startupOracle.bat
    @echo off
    %systemdrive%
    REM #
    echo.
    echo You are about to start Oracle Services and Database
    echo.
    set /p Input=Do you want to continue? (Y=Yes N=No) =
    IF /i "%Input%"=="Y" (goto Proceed)
    exit /b
    :Proceed
    echo Oracle Instance and Services Startup in progress
    echo.
    Net start OracleCSService
    Net start OracleDBConsoleorcldata
    Net Start OracleOraDb10g_home1iSQL*PLUS
    Net Start OracleOraDb10g_home1TNSListener
    Net Start OracleServiceORCLDATA
    echo.
    echo Oracle ORCL Instance and Services Startup completed Successfully
    echo Good Bye
    echo on
    EXIT /B

    Hi there,
    Thanks for getting back to me.
    Suddenly everything started working and I hadn't pushed out any fixes to users and it just started to work again.
    Anyway I am just relieved.
    Thanks
    John
     John Mackay | Support Services Manager
     HISTORIC HOUSES TRUST OF NSW
     The Mint | 10 Macquarie Street | Sydney NSW 2000
     t. 02 8239 2347 | f. 8239 2422| www.hht.net.au
      Please consider the environment before printing this email.

  • Does anyone have a solution to HDV 720p25 files not working with Lion?

    I cant play or edit 720p25 HDV files with Lion, does anyone know how to fix this bug?

    i've been having the exact same problems myself since Lion was released.  I've been having to work with .m2t files and then converting them with MPEG StreamClip to Apple ProRes 422 native quicktime files in order to even use the stupid HDD.  All of my existing .MOV files that were on the HDD prior to upgrade are now all "corrupt". Spoke with Apple reps and Focus reps and both of course are pointing fingers at each other.
    Also, found that .m2t files aren't as high quality as shooting with .mov files on the DR-HD100... interesting huh?  I mean i'm not in too much of a pickle due to the fact that the HDD is still useable it's just more time and steps before getting to edit in FCP now which is annoying considering the fact that I shelled out a lot of money for this HDD to be able to edit immediately...
    APPLE PLEASE FIX THIS!!!!
    I know it's Apple's fault because when i shoot in .mov files on the DR-HD100 and bring them in on my mac mini which is still OS X Snow Leopard, they work just fine... so it's definitely a Lion issue...
    Also, found out that once the files have been dragged onto a HDD operating within OS X Lion, they become corrupt FOREVER and you can't reverse the process!  They remain fine on the DR-HD100 but if you drag them onto a OS X Lion machine, then decide to transfer them to a OS X Snow Leopard device via USB, Network, or whatever, it won't matter because they have already been corrupted by Lion!

  • "open file" Not working with Photoshop CS2

    System
    MAc Pro Dual Quad 3Ghz, OS X 10.5.2
    I have a script that I wrote a while ago to take a series of individual bitmaps and compile them into a strip for access inanothe application. Script used to work well....
    I tried to use the script today but ran into a brick wall when trying to open files from within the script.
    below is an example of a script that will not work at all,
    tell application "Adobe Photoshop CS2"
    open file "AV:logo:rot0001.png"
    end tell
    I normally pass the function a variable for the filenames...but the above script should work fine.. but flatly refuses to !
    Below is the Error returned.
    Adobe Photoshop CS2 got an error: General Photoshop error occurred.
    - The object “current document” is not currently available.
    Arghhhh Help !!
    Rgds
    Chris

    Hello
    Perhaps your script used to work under pre-OSX10.5 (AppleScript 1.x) but now fails under OSX10.5 (AppleScript 2.x)?
    If so, the most likely cause is the drastic change in internal text handling between them. In AS2.x, internal text is Unicode only, which might prevent PSCS2 from resolving 'file path_string' descriptor (when path_string is assumed to be plain 'string', not Unicode text).
    Try the following code instead -
    tell application "Adobe Photoshop CS2"
    open ("AV:logo:rot0001.png" as alias)
    end tell
    Or -
    set a to "AV:logo:rot0001.png" as alias
    tell application "Adobe Photoshop CS2"
    open a
    end tell
    Hope this may help,
    H

  • Exe file not working with forced download script.

    I have a captivate file that I exported as an exe file for
    pc. It works fine when I download it from the server using the
    direct URL to the file but I don;t want people to actually see
    where it is located so I have a used a force-download php script.
    When I download it by way of the script... it downloads, but the
    file won't play. All I get is a DOS window pop up and then goes
    away. Same file...any ideas?
    The php file I'm using to force the download is below...
    <?php
    $filename = $_GET['file'];
    // required for IE, otherwise Content-disposition is ignored
    if(ini_get('zlib.output_compression'))
    ini_set('zlib.output_compression', 'Off');
    // addition by Jorg Weske
    $file_extension =
    strtolower(substr(strrchr($filename,"."),1));
    if( $filename == "" )
    echo "<html><title>Download
    Error</title><body>ERROR: download file NOT SPECIFIED.
    USE force-download.php?file=filepath</body></html>";
    exit;
    } elseif ( ! file_exists( $filename ) )
    echo "<html><title>Download
    Error</title><body>ERROR: File not found. USE
    force-download.php?file=filepath</body></html>";
    exit;
    switch( $file_extension )
    case "pdf": $ctype="application/pdf"; break;
    case "exe": $ctype="application/octet-stream"; break;
    case "zip": $ctype="application/x-compressed"; break;
    case "swf": $ctype="application/x-shockwave-flash"; break;
    case "doc": $ctype="application/msword"; break;
    case "xls": $ctype="application/vnd.ms-excel"; break;
    case "ppt": $ctype="application/vnd.ms-powerpoint"; break;
    case "gif": $ctype="image/gif"; break;
    case "png": $ctype="image/png"; break;
    case "jpeg":
    case "jpg": $ctype="image/jpg"; break;
    default: $ctype="application/force-download";
    header("Pragma: public"); // required
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0,
    pre-check=0");
    header("Cache-Control: private",false); // required for
    certain browsers
    header("Content-Type: $ctype");
    // change, added quotes to allow spaces in filenames, by
    Rajkumar Singh
    header("Content-Disposition: attachment;
    filename=\"".basename($filename)."\";" );
    header("Content-Transfer-Encoding: binary");
    header("Content-Length: ".filesize($filename));
    readfile("$filename");
    exit();
    ?>

    Actually...never mind. This script creates a HUGE security
    risk....

  • Link to an Excel file not working with chrome but working with IE

    Hi,
    I have used following code to create a link to an excel file so that my users can access it... it's working fine with firefox and IE, but not with chrome browser
    Report link
    please advice

    Hi,
    I did look your sample.
    Did you read link I did post?
    >
    Links to local files on pages that were retrieved via HTTP(S) are deliberately disabled in Mozilla/Firefox, because they can be a security risk, and have been used in attacks in the past.
    >
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Flash Player trust file not working with Embedded browser on linux

    Hi,
    I have an application which embeds a browser based on
    Xulrunner inside it. I have couple of flash swf files I need to
    load in the browser. The swf files talk with a javascript to change
    the page title and also to change the URL when I am browsing
    through the content in the URL. I need the URL change because I
    need to remember where I was in the flash content so that I can go
    directly to that place in the flash file when I open my browser the
    next time.
    To let the swf file do this I created a cfg file and placed
    it into the Flash Player Trust folder( I tried both the local one
    at /home/user/.macromedia/Flash_Player/#Security/FlasPlayerTrust
    and global trust file location at /etc/adobe/FlashPlayerTrust ) ,
    but I didn't get the expected result. I debugged into my app and
    found that the swf never reset the Title of the page( which
    indicates that the javascript was blocked) . It works fine from a
    firefox browser but not from inside my embedded browser. My app
    also works fine on windows and Mac . This is observed only on
    Linux. Can any body think of what else I need to do get my
    javascript embedded in the flash file working?
    Thanks
    jbsp72

    I tried out a few more things since nobody on this forum was
    responding. I tried installing another application which also
    embeds xulrunner browser. So I downloaded Prism which is a simple
    xulrunner based browser. The flash works fine with that and the URL
    gets set appropriately. So is there any setting I need to do to get
    it working. Or could somebody atleast point me to the right place
    to ask this question? :(

  • Flash File not working with DW

    "Content on this page requires a newer version of Adobe Flash Player"
    I know others have had this same issue, but after researching and trying everything, I am just not able to fix it.  Anyone out there have any ideas?  I have a website created in flash.  I used DW to import the flash file and upload to the server.  Very simple html page with nothing else but the flash file.
    Here is the website. www.meghanmcmehon.com.  Just need some help here.  Thx.

    Source code indicates that the page is still pointing to a local file for the flash content,
    <param name="movie" value="file:///Macintosh HD/Projects/Matrix Entertainment/Christopher Zurek/3422ZRK Media Files/Site/root.swf" />
    so by default it displays the "get flash" prompt.
    You need to change the all of the reference(s) to point to a file in the root folder, and re-put the page. This includes your javascript ref in the header:
    <script src="Macintosh HD:Projects:McMahon, Meghan:3481MCM Profile:3481MCM Media Files:Site:Scripts:swfobject_modified.js" type="text/javascript"></script>
    Also, you should only work in lower case wherever possible (naming files), to avoid mistakes in file references.

  • D3100 Files Not Working with Update?

    Has anyone else tried loading Nikon D3100 NEF files with the latest update? I was so excited when it came out so I wouldn't have to convert images anymore yet, it still won't open my NEF images.
    Anyone?

    Have you tried LR3.3RC? D3100 should be supported with it and it works for me. If it does not, what error message do you see, and can you upload your Raw file to somewhere in the net (e.g. www.yousendit.com) and post a link to it here?
    Beat Gossweiler
    Switzerland

  • PPCS5 files not working with PPCS6

    Hello Every One.
    I recently upgraded my CS5 To CC, and now I have the PPCS6 because CC is not available until the 17th. when I open some PPCS5 .mpg files with my CS5, everything is fine.
    But when I open the PPCS5 .mpg files with my PPCS, first the Dialog box ask me If I want to convert the file and I click OK, then the file dose appear in my timeline, but when I scroll or click on play I don't see the movie.
    Why the movie has to be converted
    why I can not see the movie
    Thanks.

    What are the details?
    Read Bill Hunt on a file type as WRAPPER http://forums.adobe.com/thread/440037
    What is a CODEC... a Primer http://forums.adobe.com/thread/546811
    What CODEC is INSIDE that file? http://forums.adobe.com/thread/440037
    Report back with the codec details of your file, use the programs below... A screen shot works well to SHOW people what you are doing
    http://forums.adobe.com/thread/592070?tstart=30
    For PC http://mediainfo.sourceforge.net/en or http://www.headbands.com/gspot/
    For Mac http://mediainspector.massanti.com/

Maybe you are looking for

  • Graphs not rendering in IE 7.0 but perfectly shown in Firefox after SSL

    Hi All, I am facing a problem. I have two instances 1) Stage instance - SSO wired but not SSL verified. Reports + Graphs are rendered properly in IE 7.0 and firefox For deployment from stage to production, we copied Repository and the web catalog fol

  • Intensity pro and Radeon 5770 ?

    Hi, I'm experiencing some problems with my Intensity Pro that I think might be due to some incompatibility issue with the ATI Radeon 5770 in my Mac Pro 3.2 ghz (Mid 2012). With the intensity pro card installed it takes about 5 minutes to boot, and th

  • Segment for WBS element in Inbound Sales Order Idoc

    Hi gurus, I am trying to create an inbound idoc for sales order ' VA01'. I need to populate WBS element in the item level under Account Assignment Tab. I am using ORDERS05 basic type. Please help to find which segment to use for WBS element. Waiting

  • How to extract embedded images from a Pagemaker file

    this is using version 6.5 select image. File > Export > Graphic set the file type and save

  • What are the shortcut keys for new tab page?

    It looks like the new tab page (Firefox 13, with the screenshots of your popular pages in it) is a mouse-only feature. Is this correct? What are the shortcut keys to access the links on the page? thanks, Patrick