Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Samba printing and /tmp removal.

Status
Not open for further replies.
Jan 10, 2001
2,873
US
I have a samba server setup. I have some printers set up on this server. Every print job gets saved in the /tmp folder where it resides until I manually remove it. Is there a way to setup samba printing where all print jobs are removed at the end of the night from /tmp? James Collins
Field Service Engineer
A+, MCP

email: butchrecon@skyenet.net

Please let us (Tek-tips members) know if the solutions we provide are helpful to you. Not only do they help you but they may help others.
 
I don't know if you can do it from Samba, but you can easily create a cron job that will do this for you.


ChrisP ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
Thats still more than I know how to do. ;-) James Collins
Field Service Engineer
A+, MCP

email: butchrecon@skyenet.net

Please let us (Tek-tips members) know if the solutions we provide are helpful to you. Not only do they help you but they may help others.
 
Sorry. Cron executes commands at scheduled times.

As the root user, type 'crontab -e' to create a crontab file for root. Add a line similar to this...

0 22 * * * /bin/rm -f /tmp/mail*

Put whatever command you use to delete the mail in the double quotes. Thats just a made up example.


The format of cron jobs is 5 time fields followed by the program to run...

minutes(0-59) hours(0-23) day-of-month(1-31) month(1-12) day-of-week(0-7)

The above example will run the command specified every day at 10pm.


ChrisP

------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
"Put whatever command you use to delete the mail in the double quotes." --> nevermind that, you don't need double quotes.

One more thing, make sure that the crond daemon is running --> "ps -ef | grep crond". If its not, then "/sbin/service crond start".



ChrisP ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top