Forum OpenACS Q&A: trigger based on other event

Collapse
Posted by arief zj on
hello guys,
i have a problem regarding triggers, as far as i know, trigger can
occur when something happened to the table which the trigger been
assigned to.

but how can we make the trigger occurs whenever the machine date
changed. for example, when the event date occurs, the data in a
column in a oracle table changes.

are we able to that? :D

p/s: i'm quite poor in deciding the best keyword to search for this
problem in the google or oradoc.sorry

TQ

Collapse
Posted by Andrei Popov on
run cron job that would update/insert into some table?
Collapse
Posted by Jun Yamog on
I think Oracle has a scheduler like cron.  But maybe it would be best you if you just a scheduled proc.  Aolserver has a cron like facility.
Collapse
Posted by arief zj on
thanx for the feedback guys, but i'm pretty much interested with the oracle stuff... 'DBMS_JOB'... cron is a good way but it will run although the database wasn't up but dbms_job will run, only when the db is also running.

thats all i got rite now..nothing much..got to try it then.
thanx anyway for the cron idea.

TQ

Collapse
Posted by Tom Jackson on

You could check out the cronjob module for OACS. It only works when the db is up because the job description is in the database. Unforunately the only trigger available is time, not database changes. It runs any SQL and/or any tcl script.

Collapse
Posted by arief zj on
hmmm...can you suggest to me few OPENACS modules which is using cron job? i try searching thru my OACS but found 1 or 2 proc.

TQ

Collapse
Posted by Tom Jackson on

The cronjob module is mostly for admin users. I guess you could have your module enter a few cronjobs upon installation, and delete them upon deinstallation, but you would have to either record the cronjob_ids, or create a special user and delete all cronjobs for that user during deinstallation. Another option is to just disable the cronjobs on deinstallation.