diff --git a/wrenchboard/src/shared_tool/site_crons.cc b/wrenchboard/src/shared_tool/site_crons.cc index 85f4feb0..4f550fd3 100644 --- a/wrenchboard/src/shared_tool/site_crons.cc +++ b/wrenchboard/src/shared_tool/site_crons.cc @@ -161,7 +161,7 @@ long ScheduleTransferJobs(CVars in, CVars &out){ try { out["total_record"] = "0"; const PGresult *res; - res = pgsql_query("SELECT initiatingamount, status, added,proc FROM money_transfer WHERE added > (now() - interval '3000 minutes') AND status = 0 ORDER BY id DESC LIMIT 100"); + res = pgsql_query("SELECT initiatingamount, status, added,proc FROM money_transfer WHERE added > (now() - interval '3000 minutes') AND status = 1 AND completed IS NULL ORDER BY id DESC LIMIT 100"); if (res != NULL && pgsql_num_rows(res) > 0) { out["total_record"] = pgsql_num_rows(res);