Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-schedule.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-schedule.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-schedule.sql	26 Mar 2001 05:36:37 -0000	1.1
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-schedule.sql	28 Mar 2001 02:15:10 -0000	1.2
@@ -38,10 +38,10 @@
   exec__items_expired         integer default 0;
   exec__err_num               integer;  -- sqlcode
   exec__err_msg               varchar;  -- substr(sqlerrm, 1, 500);
-  exec__item_rec              record;
+  item_rec                    record;
 begin
 
-    select exec__last_exec into last_exec from cr_scheduled_release_job;
+    select last_exec into exec__last_exec from cr_scheduled_release_job;
 
     for item_rec in select 
                       p.item_id, live_revision
@@ -100,11 +100,8 @@
   return 0;
 end;' language 'plpgsql';
 
-select inline_0 ();
 
-drop function inline_0 ();
 
-
 -- show errors
 
 -- initialize the scheduled publication job
@@ -117,27 +114,27 @@
 begin
 
   select job into v_job_id from user_jobs 
-   where what = 'cr_scheduled_release_exec;
+   where what = ''cr_scheduled_release_exec;'';
 
   if NOT FOUND then
-    dbms_output.put_line('
-      Submitting job to process scheduled updates to live content...');
+    raise NOTICE ''
+      Submitting job to process scheduled updates to live content...'';
 
-    dbms_job.submit(
+    dbms_job__submit(
       job        =>  v_job_id, 
-      what       =>  'cr_scheduled_release_exec;',
-      next_date  =>  sysdate,
-      interval   =>  'sysdate + ' || (interval/24/60)
+      what       =>  ''cr_scheduled_release_exec;'',
+      next_date  =>  now(),
+      interval   =>  ''now() + '' || (interval/24/60)
     ); 
 
     update cr_scheduled_release_job set job_id = v_job_id;
   else
 
-    dbms_job.change(
+    dbms_job__change(
       job        =>  v_job_id, 
-      what       =>  'cr_scheduled_release_exec;',
-      next_date  =>  sysdate,
-      interval   =>  'sysdate + ' || (interval/24/60)
+      what       =>  ''cr_scheduled_release_exec;'',
+      next_date  =>  now(),
+      interval   =>  ''now() + '' || (interval/24/60)
     );
 
   end if;
