Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Trouble sending two jobs in sequence



  I am making tests in order to use a expect script to
send the same fax to various destinations.

  The (attached) test script uploads the file and begins
two jobs with different DIALSTRINGs. The output from it
seems OK (HylaFax aknowledges both numbers), but when
running 'faxstat -s', both jobs are queued with the
first DIALSTRING.

  What can I do?

  Must I open different connections for each one? (It
wouldn't be too nice for my network, I'd like to send
moreless 1000 faxes in a bunch and the real work will be
using different hosts as server and client).

  Thank you.

-- 
Raśl Pedroche
#!/usr/bin/expect -f
#
# Script expect(1) para enviar dos trabajos a HylaFAX
# en localhost.
# This script sends the same document to 2 different
# destinations.
#
# Vlues:
#	FROMUSER "Test 1"/"Test 2"
#	LASTTIME 000259
#	MAXDIALS 4
#	MAXTRIES 3
#	SCHEDPRI 127
#	DIALSTRING "696711183"/"942354275"
#	NOTIFYADDR "raul@taller.langre-oficina.net"
#	VRES 98
#	PAGEWIDTH 209
#	PAGELENGTH 296
#	NOTIFY "done"
#	PAGECHOP "default"
#	CHOPTHRESHOLD 3
#
set timeout -1
# Connecting
# HOST=localhost
spawn ftp localhost 4559

# User
expect -exact "):"
send "raul\r"

# No password...

# Sending trabajo.ps
expect -exact "ftp> "
send "put trabajo.ps /tmp/trabajo.ps\r"

# Starting 1st job
expect -exact "ftp> "
send "quote jnew\r"

# 1st job parameters
expect -exact "ftp> "
send "quote jparm fromuser \"Test 1\"\r"
expect -exact "ftp> "
send "quote jparm lasttime 000259\r"
expect -exact "ftp> "
send "quote jparm maxdials 4\r"
expect -exact "ftp> "
send "quote jparm maxtries 3\r"
expect -exact "ftp> "
send "quote jparm schedpri 127\r"
expect -exact "ftp> "
send "quote jparm dialstring \"696711183\"\r"
expect -exact "ftp> "
send "quote jparm notifyaddr \"raul@taller.langre-oficina.net\"\r"
expect -exact "ftp> "
send "quote jparm vres 98\r"
expect -exact "ftp> "
send "quote jparm pagewidth 209\r"
expect -exact "ftp> "
send "quote jparm pagelength 296\r"
expect -exact "ftp> "
send "quote jparm notify \"done\"\r"
expect -exact "ftp> "
send "quote jparm pagechop \"default\"\r"
expect -exact "ftp> "
send "quote jparm chopthreshold 3\r"
expect -exact "ftp> "
send "quote jparm document /tmp/trabajo.ps\r"
#
# Submit Job
expect -exact "ftp> "
send "quote jsubm\r"

# 2nd job
# I've even tried starting a new Job
# Group -- doesn' work
expect -exact "ftp> "
send "quote jgnew\r"
#
expect -exact "ftp> "
send "quote jnew\r"
#
expect -exact "ftp> "
send "quote jparm fromuser \"Test 2\"\r"
expect -exact "ftp> "
send "quote jparm lasttime 000259\r"
expect -exact "ftp> "
send "quote jparm maxdials 4\r"
expect -exact "ftp> "
send "quote jparm maxtries 3\r"
expect -exact "ftp> "
send "quote jparm schedpri 127\r"
expect -exact "ftp> "
send "quote jparm dialstring \"942354275\"\r"
expect -exact "ftp> "
send "quote jparm notifyaddr \"raul@taller.langre-oficina.net\"\r"
expect -exact "ftp> "
send "quote jparm vres 98\r"
expect -exact "ftp> "
send "quote jparm pagewidth 209\r"
expect -exact "ftp> "
send "quote jparm pagelength 296\r"
expect -exact "ftp> "
send "quote jparm notify \"done\"\r"
expect -exact "ftp> "
send "quote jparm pagechop \"default\"\r"
expect -exact "ftp> "
send "quote jparm chopthreshold 3\r"
expect -exact "ftp> "
send "quote jparm document /tmp/trabajo.ps\r"
#
# Submit 2nd Job
expect -exact "ftp> "
send "quote jsubm\r"

#
# End
expect -exact "ftp> "
send "bye\r"
expect eof


Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services