If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#16
|
|||
|
|||
scheduled printing of a text file using batch files or schtasks
Most Xerox devices REQUIRE lp as the LPD printer name.
-- Alan Morris Windows Printing Team Search the Microsoft Knowledge Base he http://support.microsoft.com/search/?adv=1 This posting is provided "AS IS" with no warranties, and confers no rights. "Klaus Jorgensen" wrote in message ... Gadgetman wrote: Klaus Jorgensen;3796335 Wrote: Try redirecting the output of the lpr command to a log file: lpr -S MyIP_address -P 8550dp blank.txt lpr.log I've attempted to try your suggestion for redirecting the output of the lpr command to a log file. (The log file remains blank?) Question:could it be due to the raw file data being passed? Also: do you have an example of a known working batch file syntax for using the LPR command? If a log file is created and is empty, the lpr command is ok. If the raw file is empty, the printer might probably just ignore the file - try grab the output of a Windows test print to a test.prn and use that file with the lpr command. Also, the printer could be restrictive with the port name, try using lpt1, lp1 or pr1 instead of 8550dp. If a printer server box (e.g. JetDirect) has more than one port, the port name must specify the actual port, but with a built-in network card in the printer, it shouldn't really matter. /klaus |
Ads |
#17
|
|||
|
|||
scheduled printing of a text file using batch files or schtasks
Klaus Jorgensen;3797327 Wrote: Gadgetman wrote: Klaus Jorgensen;3796335 Wrote: Try redirecting the output of the lpr command to a log file: lpr -S MyIP_address -P 8550dp blank.txt lpr.log I've attempted to try your suggestion for redirecting the output of the lpr command to a log file. (The log file remains blank?) Question:could it be due to the raw file data being passed? Also: do you have an example of a known working batch file syntax for using the LPR command? If a log file is created and is empty, the lpr command is ok. If the raw file is empty, the printer might probably just ignore the file - try grab the output of a Windows test print to a test.prn and use that file with the lpr command. Also, the printer could be restrictive with the port name, try using lpt1, lp1 or pr1 instead of 8550dp. If a printer server box (e.g. JetDirect) has more than one port, the port name must specify the actual port, but with a built-in network card in the printer, it shouldn't really matter. /klaus Klaus, Well no success with lpt1, lp1 or pr1 However, I decided to go a different route to make the batch file work. SUCCESS!!!! I decided to use "SCHTASKS" to call a batch file named "WARMUP.BAT" BREAKDOWN OF METHOD USED: The command string I used for "SCHTASKS" was: SCHTASKS /CREATE /TN "PRINTER WARM UP" /TR C:\WARMUP.BAT /SC DAILY /ST 07:00:00 /ED 06/13/2009 /RU "username" /RP "password" The contents of my Batch file "WARMUP.BAT" was: NOTEPAD /P C:\PRINTER_WARM_UP.TXT Once I was able to make the batch file work on it's own, I knew it could work using "SCHTASKS" (As long as the batch file and text file were positioned on the system in the appropriate directory for "SCHTASKS" to correctly locate and execute.) Now I just need to figure out the correct syntax for executing the task everyday at 7am, and make it run every 239 minutes until 7pm (M-F if possible ?) Since the printer goes into power saving mode after 240 minutes. If I have to run it everyday of the week I don't mind, as long as I can get the above to work. I'm unable to use the suggested /RI for some reason, and find no reference to this command anywhere. (Typo perhaps?) Thanks for your continued help on this! Glenn -- Gadgetman ------------------------------------------------------------------------ Gadgetman's Profile: http://forums.techarena.in/member.php?userid=51066 View this thread: http://forums.techarena.in/showthread.php?t=981521 http://forums.techarena.in |
#18
|
|||
|
|||
scheduled printing of a text file using batch files or schtasks
'Alan Morris [MSFT Wrote: ;3798457']Most Xerox devices REQUIRE lp as the LPD printer name. -- Alan Morris Windows Printing Team Search the Microsoft Knowledge Base he http://support.microsoft.com/search/?adv=1 This posting is provided "AS IS" with no warranties, and confers no rights. "Klaus Jorgensen" wrote in message ... Gadgetman wrote: Klaus Jorgensen;3796335 Wrote: Try redirecting the output of the lpr command to a log file: lpr -S MyIP_address -P 8550dp blank.txt lpr.log I've attempted to try your suggestion for redirecting the output of the lpr command to a log file. (The log file remains blank?) Question:could it be due to the raw file data being passed? Also: do you have an example of a known working batch file syntax for using the LPR command? If a log file is created and is empty, the lpr command is ok. If the raw file is empty, the printer might probably just ignore the file - try grab the output of a Windows test print to a test.prn and use that file with the lpr command. Also, the printer could be restrictive with the port name, try using lpt1, lp1 or pr1 instead of 8550dp. If a printer server box (e.g. JetDirect) has more than one port, the port name must specify the actual port, but with a built-in network card in the printer, it shouldn't really matter. /klaus AWESOME! LP WORKED! I was able to make the batch file work, however; it will not run using "SCHTASKS" BUT! Better Yet! I was able to use the GUI version which does execute the LPR batch file, and it allowed me to utilize the advanced settings for executing all of my requirements: Start time: 7am, then run every 239 minutes, End at: 7pm You Guys ROCK! Thanks for all your help on this one! Hopefully someone else can utilize this method as well! -- Gadgetman ------------------------------------------------------------------------ Gadgetman's Profile: http://forums.techarena.in/member.php?userid=51066 View this thread: http://forums.techarena.in/showthread.php?t=981521 http://forums.techarena.in |
|
Thread Tools | |
Display Modes | |
|
|