Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] new cron print job...
Date: Thu, 11 Dec 2008 17:12:49
Message-Id: 5bdc1c8b0812110912i736ba27dy3cfe9196b00a43c4@mail.gmail.com
1 Hello,
2 Thanks to those that helped me with the new printer thread the
3 other day. We purchased an HP M1522nf from NewEgg. It arrived in under
4 24 hours and tool me less than 2 minutes to get a test page. Quite a
5 success. Thanks!
6
7 I'd now like to set up a cron job to print a small file each
8 evening just to keep the printers rollers moving every day. I've never
9 used cron before. It looks *fairly* straight forward but I'd like to
10 get some verification if I might. Thanks again.
11
12 1) In /root I created a small executable file that store df -h to a
13 file and then I print that file using lpr. I executed that file using
14 lpr -D HP_M1522nf print_todays_info and it appears to have worked.
15 (I'm remote but I do see a print job in the CUPS records. I'll call
16 later to see if it's printing correctly but I suspect it is.)
17
18 2) As root I ran crontab -e. The editor (nano) came up fine.
19
20 3) I entered the following line for testing
21
22 5 * * * * /root/print_todays_info
23
24 If I'm correct then I understand that this would run the job every
25 hour 5 minutes after the hour. I'll change it to
26
27 5 1 * * * /root/print_todays_info
28
29 after I've tested it a bit more to make it a 1:05AM print job.
30
31 Looking in the CUPS logs on the remote machine it appears a new copy
32 printed a 5 minutes after 9AM so I'm thinking it's set up.
33
34 Does this sound about right? Anything else I should be doing?
35
36 Thanks,
37 Mark

Replies

Subject Author
Re: [gentoo-user] new cron print job... David Sveningsson <ext@×××××××.com>