Monday, November 08, 2010 at 12:05 AM.


on addTask (taskTime, scriptString, minutesBetweenRuns) {
	<<Add a task to the tasks table.
		<<taskTime is the next time the task will be run.
		<<scriptString is the text of a short script that we run.
		<<minutesBetweenRuns is self-documenting...
			<<if it's 0, the task is deleted after it is run
			<<Create the script as a script object, not as a string.
				<<3/9/99 AR
	<<10/13/99; 8:46:25 AM by DW
		<<Initialize ctRuns to zero.
	local (adr);
	adr = table.uniqueName ("task", @user.scheduler.tasks);
	new (tableType, adr);
	adr^.taskTime = taskTime;
	script.newScriptObject (scriptString, @adr^.script);
	adr^.minutesBetweenRuns = minutesBetweenRuns;
	adr^.ctRuns = 0; //10/13/99 DW
	adr^.error = "";
	return (adr)}

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.