Index: openacs-4/packages/xowf/tcl/atjob-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/atjob-procs.tcl,v diff -u -N -r1.8.2.3 -r1.8.2.4 --- openacs-4/packages/xowf/tcl/atjob-procs.tcl 17 Jul 2019 15:44:41 -0000 1.8.2.3 +++ openacs-4/packages/xowf/tcl/atjob-procs.tcl 9 Sep 2019 17:05:09 -0000 1.8.2.4 @@ -122,10 +122,13 @@ ::$package_id set_url -url [::$package_id package_url][::$owner_id name] :log "--at executing atjob $cmd" - if {[catch {eval $owner_id $cmd} errorMsg]} { + ad_try { + $owner_id {*}$cmd + if {[::xo::db::Class exists_in_db -id [$item revision_id]]} { + $item set_live_revision -revision_id [$item revision_id] -publish_status "expired" + } + } on error {errorMsg} { ns_log error "\n*** atjob $owner_id $cmd lead to error ***\n$errorMsg\n$::errorInfo" - } else { - $item set_live_revision -revision_id [$item revision_id] -publish_status "expired" } ns_set cleanup } Index: openacs-4/packages/xowf/tcl/xowf-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/xowf-init.tcl,v diff -u -N -r1.3.2.1 -r1.3.2.2 --- openacs-4/packages/xowf/tcl/xowf-init.tcl 23 Jul 2019 10:12:25 -0000 1.3.2.1 +++ openacs-4/packages/xowf/tcl/xowf-init.tcl 9 Sep 2019 17:05:09 -0000 1.3.2.2 @@ -18,9 +18,8 @@ # Make sure, we have not missed some at-jobs, while we were down ad_schedule_proc -thread t -once t 1 ::xowf::atjob check -with_older true - ns_after 60 { - ad_schedule_proc -thread t 60 ::xowf::atjob check - } + # the following job is executed after 60 seconds + ad_schedule_proc -thread t 60 ::xowf::atjob check }