Schedule

Schedules tasks in an external database.

Usage

schedule (schedule-data, connect-string, user, password : task-id-data)

Details

Adds tasks based on schedule-data to a task table in an external database reachable through connect-string, in a schema accessible by user via password. The table will be created if it does not already exist. The table name is defined in the Theseus.properties file and has the following structure:
      (task_id NUMBER, schedule VARCHAR (255));
    

Notes

Known Bugs

Example

Using the input:
      RELATION schedules: info char
      05 08-17 1,3,5 * * c:\homeseekers.plan c:\homeseekers.data
      06 12-15 1-5 * * c:\news-agent.plan c:\news-agent.data
    
when executing the plan:
      PLAN test
      {
       INPUT: stream schedules
       OUTPUT: stream tasks
      
       BODY
       {
         schedule (schedules, "jdbc:oracle:thin:@mydb", "scott", "tiger" : tasks)
       }
      }
    
will write the data to the task table and will output (assuming these are the first two tasks to be entered):
      ----------------------------------------------
      RELATION: test_tasks
         attrs: task_id
      ----------------------------------------------
      1
      2
      ----------------------------------------------