Jump to content

ImgBurn Support Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Photo

Having trouble running ImgBurn with Scheduled Tasks


Forum Rules

Read the Guides forum if you don't know how to do something. :readbook:
If you have a question or a problem, check the FAQ and use the Search to see if you can find the answer for yourself. :lightbulb:
If you're having trouble burning double layer media, read Here.
Still stuck? Create a new thread and describe your issue in detail.
Make sure you include a copy of the program's log in your post. No log = :chair:


  • Please log in to reply
8 replies to this topic

#1 Jesse

Jesse

    ISF Newbie

  • Members
  • Pip
  • 5 posts

Posted 04 June 2009 - 04:27 PM

I may be going about this the wrong way, but this is what I've done so far. I have a large SQL database dump that I need to backup to a BD-RE each morning. I have a created a bat file to do this, and the bat file runs fine on its own. I've added a scheduled task to Windows (running Vista) to execute the bat file every morning at 5:00 am, and assigned it to a domain admin account and told it to run whether or not I am logged into the computer. After creating the task, I ran it manually while logged into the computer. It copied over my SQL dump, but then nothing happened. ImgBurn did not load or burn the disc. What am I missing here?

Here's my bat file:
@ECHO OFF
:START
ECHO Mapping T:...
net use T: \\san\archive
IF errorlevel 1 GOTO QUIT
ECHO Copying the SQL .bak file...
copy "T:\SQL Backup\itiserver_db_*.bak" "D:\burn"
IF errorlevel 1 GOTO QUIT
ECHO Changing to the IMGBURN directory...
C:
cd "C:\Program Files\ImgBurn"
IF errorlevel 1 GOTO QUIT
ECHO Starting the Burn...
ImgBurn.exe /MODE BUILD /SRC "D:\Burn" /DEST G: /ERASE /FILESYSTEM "UDF" /UDFREVISION "2.01" /VOLUMELABEL "Director SQL Backup" /SPEED 2x /VERIFY YES /DELETESOURCE NO /EJECT YES  /WAITFORMEDIA /START /ROOTFOLDER YES /CLOSESUCCESS /NOIMAGEDETAILS
IF errorlevel 1 GOTO QUIT
ECHO Backup complete.
ECHO Flushing the Burn folder...
del /Q D:\burn\*.*
IF errorlevel 1 GOTO QUIT
ECHO All Done!
pause
exit

:QUIT
echo There was an error!
pause
exit

Thanks for a great program!!

#2 mmalves

mmalves

    resident n00b

  • Beta Team Members
  • PipPipPipPipPip
  • 7,094 posts
  • Gender:Male
  • Location:Itu - SP - Brazil

Posted 04 June 2009 - 05:04 PM

Instead of changing to ImgBurn's directory, try calling it straight like this:
@ECHO OFF
:START
ECHO Mapping T:...
net use T: \\san\archive
IF errorlevel 1 GOTO QUIT
ECHO Copying the SQL .bak file...
copy "T:\SQL Backup\itiserver_db_*.bak" "D:\burn"
IF errorlevel 1 GOTO QUIT
ECHO Starting the Burn...
"C:\Program Files\ImgBurn\ImgBurn.exe" /MODE BUILD /SRC "D:\Burn" /DEST G: /ERASE /FILESYSTEM "UDF" /UDFREVISION "2.01" /VOLUMELABEL "Director SQL Backup" /SPEED 2x /VERIFY YES /DELETESOURCE NO /EJECT YES  /WAITFORMEDIA /START /ROOTFOLDER YES /CLOSESUCCESS /NOIMAGEDETAILS
IF errorlevel 1 GOTO QUIT
ECHO Backup complete.
ECHO Flushing the Burn folder...
del /Q D:\burn\*.*
IF errorlevel 1 GOTO QUIT
ECHO All Done!
pause
exit

:QUIT
echo There was an error!
pause
exit
Also, if you want to tweak the message shown after ImgBurn's operation have a look here ;)

#3 Jesse

Jesse

    ISF Newbie

  • Members
  • Pip
  • 5 posts

Posted 04 June 2009 - 05:10 PM

I made the change, but it didn't help. The bat file still works on it's own, but not through a scheduled task. Can ImgBurn even be called through Task Scheduler?

#4 mmalves

mmalves

    resident n00b

  • Beta Team Members
  • PipPipPipPipPip
  • 7,094 posts
  • Gender:Male
  • Location:Itu - SP - Brazil

Posted 04 June 2009 - 05:32 PM

Then I guess ImgBurn doesn't work if it can't display its window :unsure:

#5 Jesse

Jesse

    ISF Newbie

  • Members
  • Pip
  • 5 posts

Posted 04 June 2009 - 05:33 PM

Is there another method I can use to schedule an automated burn?

#6 mmalves

mmalves

    resident n00b

  • Beta Team Members
  • PipPipPipPipPip
  • 7,094 posts
  • Gender:Male
  • Location:Itu - SP - Brazil

Posted 04 June 2009 - 06:02 PM

I was wrong, ImgBurn works fine being called from a scheduled task, just tried it now and it burned a disc while no user was logged on :)

Try this:
@ECHO OFF
:START
ECHO Mapping T:...
net use T: \\san\archive
IF errorlevel 1 GOTO QUIT
ECHO Copying the SQL .bak file...
copy "T:\SQL Backup\itiserver_db_*.bak" "D:\burn"
IF errorlevel 1 GOTO QUIT
ECHO Starting the Burn...
"C:\Program Files\ImgBurn\ImgBurn.exe" /MODE BUILD /BUILDMODE DEVICE /SRC "D:\burn" /DEST "G:" /FILESYSTEM "UDF" /UDFREVISION "2.01" /VOLUMELABEL "Director SQL Backup" /SPEED 2x /ERASE /TESTMODE NO /VERIFY YES /DELETESOURCE NO /EJECT YES /START /CLOSESUCCESS /WAITFORMEDIA /NOIMAGEDETAILS /ROOTFOLDER YES
IF errorlevel 1 GOTO QUIT
ECHO Backup complete.
ECHO Flushing the Burn folder...
del /Q D:\burn\*.*
IF errorlevel 1 GOTO QUIT
ECHO All Done!
pause
exit

:QUIT
echo There was an error!
pause
exit
You might need to use Task Manager to kill any ImgBurn.exe process(es) that may be stuck from previous attempts.

#7 Jesse

Jesse

    ISF Newbie

  • Members
  • Pip
  • 5 posts

Posted 04 June 2009 - 06:17 PM

Hmm...
It works if I choose 'Run only when the user is logged in' but doesn't work if I choose 'Run whether user is logged in or not'. I guess I just won't log out of the computer :)

#8 mmalves

mmalves

    resident n00b

  • Beta Team Members
  • PipPipPipPipPip
  • 7,094 posts
  • Gender:Male
  • Location:Itu - SP - Brazil

Posted 04 June 2009 - 06:26 PM

When it doesn't work and you log back on, is there a ImgBurn.exe in memory?

#9 Jesse

Jesse

    ISF Newbie

  • Members
  • Pip
  • 5 posts

Posted 04 June 2009 - 06:31 PM

I'm not logging out, I'm manually starting the task to make sure it works. When "Run whether user is loggin in or not" is checked - even if I'm still logged in - ImgBurn does not load. It isn't in my list of processes. The bat file is being launched though, I can see that my file copy runs and a new copy has been moved over, but its like the process pauses when it comes to actually launch imgburn.

I'm not that worried about it, I usually never log out anyway, I just lock the screen. As long as it works with "Run only when user is logged in" I'm happy.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users