Forum OpenACS Q&A: ns_schedule_daily , ns_schedule_weekly

Dear all ,
when attempting to use ns_schedule_weekly or ns_schedule_daily
like this
ns_schedule_weekly ?-thread? ?-once? day hour minute procname ?args?

if one of the args was optional the proc doesn't work
example :
ns_schedule_weekly ?-thread? ?-once? day hour minute procname -optional_param value_of_the_param

the same for ns_schedule_daily
any suggestions ,
thanks

Collapse
Posted by Tom Jackson on
You could use my cronjob package:

http://rmadilo.com/files/cronjob/ the latest version is cronjob-0.2.apm. It stores your scripts in a database, you can run them on a schedule or just when you want to.

If you need more help with ns_schedule_weekly, post the exact command you are using, and also post the proc you are calling, with the proc signature.

My guess is that you can include at most one argument if you use a proc. You can also use a script. If you have more than one argument to pass, then use a list to package them into one argument.

In nearly every case you should use the -thread option.

The command signature that you show above doesn't match up with the documentation that I use, or that gets printed out if you get an error, what version of AOLserver are you using?

Link to docs:

http://rmadilo.com/files/nsapi/ns_schedule_weekly.html
http://rmadilo.com/files/nsapi/ns_schedule_proc.html
http://rmadilo.com/files/nsapi/ns_schedule_daily.html

Collapse
Posted by ahmad abdoh on
NO ,
it has just one variable but if that variable is optional
it doesn't get fired .
any suggestions ,
i think it is a bug.
regards ,
Collapse
Posted by Tom Jackson on
Probably not a bug, and you haven't provided the code you are using to call the scheduled proc, or the proc code. Without this, nobody can help you. But, I very seriously doubt that you have discovered a bug. Also, what version of AOLserver are you using?