Handy command line usage info for automated print jobs via cron for example...


The "l" option to the lpoption command is your friend for getting color saturation or duplexing to suit your needs correctly....

$ lpoptions -d AutoPrintViaCron -l

MediaType/Media Type: PLAIN_HIGH PLAIN_NORMAL *PLAIN_DRAFT PLAIN_SUPERDRAFT LETTERHEAD_HIGH LETTERHEAD_NORMAL LETTERHEAD_DRAFT LETTERHEAD_SUPERDRAFT RECYCLED_HIGH RECYCLED_NORMAL RECYCLED_DRAFT COLORPAPER_HIGH COLORPAPER_NORMAL COLORPAPER_DRAFT PREPRINTED_HIGH PREPRINTED_NORMAL PREPRINTED_DRAFT PREPRINTED_SUPERDRAFT PMMATT_HIGH PMMATT_NORMAL PLATINA_HIGH PLATINA_NORMAL PMPHOTO_HIGH PMPHOTO_NORMAL PSGLOS_HIGH PSGLOS_NORMAL ENV_HIGH ENV_NORMAL THICK_HIGH THICK_NORMAL
Ink/Grayscale: *COLOR MONO
Duplex/Duplex Tumble: *None DuplexNoTumble DuplexTumble
PageSize/Media Size: A4 TA4 4X6FULL T4X6FULL 2L T2L A6 A5 B5 L TL INDEX5 8x10 T8x10 4X7 T4X7 ENV10 ENVC6 *Letter TLetter Legal
InputSlot/Paper Source: *Auto Cassette1 Cassette2 Rear

Here is the script I use to keep my inkjet flowing smoothly twice a week:

#!/bin/sh

# 
#/usr/bin/lp -d AutoPrintViaCron -o MediaType=PLAIN_HIGH /home/tim/Documents/inkFlushChart$((1 +  RANDOM % 3)).pdf

# Notice the RANDOM usage above does NOT work in debian use the following

# shuf command instead to randomize among three different placements formats

# on your page in my case: upper middle or bottom of page.


/usr/bin/lp -d EPSON_ET_4760_Series -o MediaType=PLAIN_HIGH -o ColorModel=Color /home/tim/Documents/inkFlushChart$(shuf -i 1-3 -n 1).pdf


Here is an example cron command line I wrote to keep my ink jet system clog free without having to remember to print to it twice a week:

# nozzle flush sunday morning and wednesday afternoon...
#
0 7 * * 0 /home/tim/bin/inkjetnozzleflush.sh 2>&1 > /tmp/cron1.txt
0 13 * * 3 /home/tim/bin/inkjetnozzleflush.sh 2>&1 > /tmp/cron1.txt


Had to add the -o MediaType=PLAIN_HIGH to get full color saturation output of the following
pdf content....

This ensures that all four color nozzle sets get flushed twice a week as recommended by inkjet printing experts. My infrequently used epson ecotank printer has been running trouble free for years now.

Comments

Popular

About Me...

My dad called me Timbocephus from time to time when I was growing up. He was a Hank Williams fan at some point I believe.

    Of course everyone recognizes the "Timbo" nickname. But going deeper into mid 20th century popular culture we find that Hank famously stuck the "Bocephus" moniker on his young son Hank Jr. There are several suggested sources for the "Bocephus" name and you can find those on line very readily if you google it.

    Having said that, I like this one best: The mysterious appellation that became part of American folklore in middle of the 20th century: Biblical/Latin Etymology: Some trace it back to a neoclassical blend of Beau (French for beautiful) and Cephas (the Aramaic name given to the Apostle Peter, meaning "stone"). [1]  (https://gardenandgun.com/ask-gg-garden-thievery-and-the-birth-of-bocephus)

Check out my very first blog entry about Psalms 46:1