Page 1 of 1 1
Topic Options
#209821 - 2015-01-14 12:33 PM addprinter
Jlmartinez Offline
Getting the hang of it

Registered: 2008-05-20
Posts: 75
Loc: Sevilla, Spain
Hello everyone!!
I want to make an script that add a random printer from several possible...but i dont know how to do it.

Example:

Printers: printer1, printer2, printer3
User1 go to printer1, user2 to printer3, user3 to printer3, user4 to printer2...

Is this possible?
Thanks for your help!!

Top
#209824 - 2015-01-14 01:51 PM Re: addprinter [Re: Jlmartinez]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
Rnd()

When you say random, is there no logic behind it? The closest, the least used??
_________________________
!

download KiXnet

Top
#209826 - 2015-01-14 02:20 PM Re: addprinter [Re: Lonkero]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
If you are trying to distribute the load across similar printers in a central area, you'd be better served by implementing a printer pool. Print to the pool and the job is directed to the next available printer in the pool. Any coded method would likely leave one printer more heavily used.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.164 seconds in which 0.098 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org