Forum OpenACS Q&A: Scheduling processes?

Collapse
Posted by Shalon Wood on
I'm slowly figuring out how to add the bits and peices of my
experience point system, but I've run into something that I can't
figure out: I need to do some processing several times per day. I can
see that there are processes that ACS runs on a scheduled basis; how
do I add a new one?

Shalon Wood

Collapse
Posted by Don Baccus on
Check out the AOLserver Tcl API manual pages on the procs ns_schedule_daily, ns_schedule_weekly, ns_schedule_proc etc.
Collapse
Posted by Shalon Wood on
Ah, I was looking in the ACS documentation...

Ok, but where do I *put* the ns_schedule_daily call? I see how to use it; is there an ACS file with schedule calls?

Shalon Wood

Collapse
Posted by David Kuczek on
Hello Shalon,

I only took a quick look at scheduled procs once, so I can't help you that much. But I tried to analyze them at /tcl/ecommerce-scheduled-procs.tcl. They are well documented...

Have fun.

Collapse
Posted by Dave Bauer on
If you are writing custom code for your site, put it in yousite-shceduled-procs.tcl in the private Tcl library, usually web/yoursite/tcl. All files in that directory get loaded on startup. I would put it in its own file if they are unique to your site.
Collapse
Posted by Shalon Wood on
Hmm Ok, I think I'm missing something -- and I've looked all over the documentation pages. Where do the files in /tcl get called? What am I missing here?

Shalon Wood

Collapse
Posted by Shalon Wood on
Ah. Thanks, Dave. Figures that I should have rechecked after pausing in the middle of my question to double-check the docs....Where is that documented, exactly? I have a feeling I'm missing some document somehwere...
Collapse
Posted by Connie Hentosh on
That would be in your configuration file for aolserver... when you start it you give it a line like
	bin/nsd -ft yourserver.tcl
in yourserver.tcl you will see a section
	ns_section "ns/server/${server}/tcl"
		ns_param library "/web/${server}/tcl"
The sample config that I took from the install documentation has that in there. The parameter library will source all the files in that directory.