Need to run a batch file from Macro Scheduler
Posted: 02 May 2017 10:05
I i'm trying to successfully run a batch job from Marco Scheduler software (task scheduler)
When I double click on my batch file to run it, it works perfectly. but It gives me this error when I'm trying to run it from my task scheduler software (Macro Scheduler).
Here's my batch file, it calls the mogify.exe executable from ImageMagick apps
-------------------------------------
@echo off
set IMDIR="C:\Program Files\ImageMagick-7.0.5-Q16"
set WORKINGDIR="C:\Private\overviews\bkp_ext"
set OUTPUTDIR="Z:\transportation\xfiles\bi\test\overviews\montreal"
pushd %WORKINGDIR%
%IMDIR%\mogrify.exe -gravity south -splice 0x20 -pointsize 16 ^
-annotate +0+33 "%%[t]%%[e]" -path %OUTPUTDIR% -format jpg "*._*"
------------------------------------
Here's the error message when it run via Marco Scheduler
C:\WINDOWS\system32>"C:\Program Files\ImageMagick-7.0.5-Q16\"mogrify.exe -gravit
y south -splice 0x20 -pointsize 16 -annotate +0+33 "%[t]%[e]" -format jpg "R:\Pr
ivate\overviews\bkp_ext\*._*"
mogrify.exe: unable to open image 'jpg:': Invalid argument @ error/blob.c/OpenBl
ob/3094.
mogrify.exe: unrecognized image format `jpg' @ error/mogrify.c/MogrifyImageComma
nd/4936.
Any help would be appreciated
Thanks
Eric
When I double click on my batch file to run it, it works perfectly. but It gives me this error when I'm trying to run it from my task scheduler software (Macro Scheduler).
Here's my batch file, it calls the mogify.exe executable from ImageMagick apps
-------------------------------------
@echo off
set IMDIR="C:\Program Files\ImageMagick-7.0.5-Q16"
set WORKINGDIR="C:\Private\overviews\bkp_ext"
set OUTPUTDIR="Z:\transportation\xfiles\bi\test\overviews\montreal"
pushd %WORKINGDIR%
%IMDIR%\mogrify.exe -gravity south -splice 0x20 -pointsize 16 ^
-annotate +0+33 "%%[t]%%[e]" -path %OUTPUTDIR% -format jpg "*._*"
------------------------------------
Here's the error message when it run via Marco Scheduler
C:\WINDOWS\system32>"C:\Program Files\ImageMagick-7.0.5-Q16\"mogrify.exe -gravit
y south -splice 0x20 -pointsize 16 -annotate +0+33 "%[t]%[e]" -format jpg "R:\Pr
ivate\overviews\bkp_ext\*._*"
mogrify.exe: unable to open image 'jpg:': Invalid argument @ error/blob.c/OpenBl
ob/3094.
mogrify.exe: unrecognized image format `jpg' @ error/mogrify.c/MogrifyImageComma
nd/4936.
Any help would be appreciated
Thanks
Eric