diff --git a/db/schema_condor.sql b/db/schema_condor.sql
index c3f53b66042..fc9117c17a4 100644
--- a/db/schema_condor.sql
+++ b/db/schema_condor.sql
@@ -5,3 +5,6 @@ create table batch_file_assoc (
alter table batch_file_assoc
add unique(job_file_id, batch_id);
+
+alter table workunit
+ add index wu_batch(batch);
diff --git a/html/user/submit.php b/html/user/submit.php
index 92f9160ff72..80feb305a69 100644
--- a/html/user/submit.php
+++ b/html/user/submit.php
@@ -310,7 +310,8 @@ function handle_query_batch($user) {
row2("state", batch_state_string($batch->state));
row2("# jobs", $batch->njobs);
row2("# error jobs", $batch->nerror_jobs);
- row2("logical end time", time_str($batch->logical_end_time));
+ //row2("logical end time", time_str($batch->logical_end_time));
+ row2("expiration time", time_str($batch->expire_time));
row2("progress", sprintf("%.0f%%", $batch->fraction_done*100));
if ($batch->completion_time) {
row2("completed", local_time_str($batch->completion_time));
diff --git a/html/user/submit_rpc_handler.php b/html/user/submit_rpc_handler.php
index 9d0918223d6..519ba0a8c62 100644
--- a/html/user/submit_rpc_handler.php
+++ b/html/user/submit_rpc_handler.php
@@ -619,6 +619,7 @@ function ping($r) {
case 'query_job': query_job($r); break;
case 'query_completed_job': query_completed_job($r); break;
case 'retire_batch': handle_retire_batch($r); break;
+ case 'set_expire_time': handle_set_expire_time($r); break;
case 'submit_batch': submit_batch($r); break;
default: xml_error(-1, "bad command: ".$r->getName());
}
diff --git a/lib/remote_submit.cpp b/lib/remote_submit.cpp
index 0891e47d0b5..b8f03ccc911 100644
--- a/lib/remote_submit.cpp
+++ b/lib/remote_submit.cpp
@@ -669,6 +669,7 @@ int set_expire_time(
sprintf(buf, "%s\n", batch_name);
request += string(buf);
sprintf(buf, "%f\n", expire_time);
+ request += string(buf);
request += "\n";
sprintf(url, "%ssubmit_rpc_handler.php", project_url);
FILE* reply = tmpfile();
diff --git a/samples/condor/request_gen b/samples/condor/request_gen
index bfb19ebd06c..89fb1627428 100755
--- a/samples/condor/request_gen
+++ b/samples/condor/request_gen
@@ -11,6 +11,7 @@
// stderr_out1, stderr_out2: stderr output of the 2 jobs
$t = time();
+$expire = $t + 86400;
$batch_name = "batch_$t";
$job_name_1 = "job1_$t";
$job_name_2 = "job2_$t";
@@ -21,5 +22,6 @@ BOINC_ABORT_JOBS 6 $job_name_1 $job_name_2
BOINC_FETCH_OUTPUT 3 $job_name_1 . stderr_out1 ALL 1 out out1
BOINC_FETCH_OUTPUT 4 $job_name_2 . stderr_out2 ALL 1 out out2
BOINC_RETIRE_BATCH 5 $batch_name
+BOINC_SET_LEASE 6 $batch_name $expire
";
?>