1 Reply Latest reply on Aug 16, 2006 12:15 PM by <newbie />

    CF Execute

    javedm
      Hi,

      Our requirement is to have a daily database dump. We have created a batch file which takes a dump of DB. We cannot use windows scheduler as it is login based and there is no gaurentee that someone else can log us out .

      We created a CFMl file which calls the .bat file using <cfexecute> and placed it on the CF schedule.
      The problem is that this script is being executed but there is no dump getting created. A log file is generated with one line of no useful data.

      We have observed that the exp.exe (which is used to export the dump) is getting hung. Our guess is that the '\' and '@' we use in the batch file are the culprits but we are not sure.

      Here's what we have;
      - website\scripts\DailyBack.cfm which is configured from CFScheduler to run every day
      - c:\scripts\dailyBackup.bat which contains the following piece of code

      exp userid=userId/pwd@devSchema file='c:\backup\devSchema.dmp' log='c:\backup\devSchema.log' full=y


      Can someone throw a light on this problem, please.
        • 1. Re: CF Execute
          <newbie /> Level 1

          > exp.exe (which is used to export the dump) is getting hung.

          Perhaps the account that the ColdFusion Service is running under does not
          have enough or appropriate permissions to run cmd.bat or exp.exe?

          I think you can change the account in the Services Control Panel.

          You may also want to consider Directory/File read/write permissions for both
          accounts; the one CF is running under and the one you are specifying in the
          batch file.

          I'm guessing you have had success with a simple cfexecute example...

          <cfexecute name = "C:\WinNT\System32\netstat.exe"
          arguments = "-e"
          outputFile = "C:\Temp\output.txt"
          timeout = "1">
          </cfexecute>


          Good luck!