Subject | Re: Proposal: FIST |
---|---|
Author | Simon Carter |
Post date | 2005-11-10T11:12:11Z |
--- In Firebird-Architect@yahoogroups.com, Jim Starkey <jas@n...> wrote:
requirements. And the goodwill of a developer to pick this up and run
with it, as it were.
0 or whatever)
issue, in the interests of simplicity I would say 1 tran per task.
Once again though, its a good point for discussion.
example, but some one in the future might ask for it.
c. If I was asked to produce a one off report, scheduled for a
specific date time I could create the task and ignore it until run.
d. Nightly maintenance, data pruning/validation etc etc.
f. I was thinking of this in similar terms to a trigger, where it
could be ACTIVE/INACTIVE.
Recurring tasks should also have the ability to be scheduled once per
period at a specified time, or scheduled to run at different, user
specified intervals.
So you would definately need to include an execution date/time.
For simplicity maybe, but you might want to update or manipulate
records daily between 0800hrs and 1700hrs whilst your employees are on
site, rather than continuously. Just a thought.
write a log entry etc. Personally though, I think notification is
important.
Perhaps adding another one
EXECUTE TASK <name>;
procedure as and when need arises?
rgds
Si
> I've got a similar feature in Netfrastructure that gets very heavy uselet me
> for backups, replication, calendar event notification, report
> generation, etc. Netfrastructure is a different environment, but
> sketch the interface for reference.updateSchedule:
>
> A scheduled task is registered with the Connection method
>(which,
> public void updateSchedule (String appName, String eventName,
> String schedule);
>
> The string "schedule" is the cron syntax extended to include seconds
> (yes, it's confusing, but I can blame someone else for it). If the
> schedule string is null, the schedule is cancelled. The actual task is
> executing by calling the method
>
> public void scheduled (Connection cnct, String event) throws
> Exception
>
> in the <appName> application class. The connection passed to the
> scheduled task handler is the same of the account that originally
> scheduled the task.
>
>
> The design can (and should) follow agreement on the requirements
> incidentally, are a terrific first pass).Thankyou, I fully agree that the design should follow an agreement on
requirements. And the goodwill of a developer to pick this up and run
with it, as it were.
> We don't have a concept of system wide, nor, since the engine doesn'tFair enough.
> know about individual database until one is attached, could it.
> Scheduled tasks should be database specific. The security problems
> involved in scheduling tasks in other databases are almost certainly
> unsolveable. And, I think, unnecessary.
> How does the engine know if the scheduled task completed successfully?Procedure could raise an exception or return a valid result code (int
0 or whatever)
> What if the task needs to start several transactions? Wouldn't it makeIf PSQL had support for start/commit/rollback this would not be an
> sense to require the task to commit and rollback if it failed to do so?
issue, in the interests of simplicity I would say 1 tran per task.
Once again though, its a good point for discussion.
> >4. Schedules.a, b, e. Not sure at the moment, TBH. Maybe/maybe not a good
> >
> >FIST should empower DBAs, Developers and users with the ability to:
> >
> > a. Initiate a task as soon as the engine is started.
> > b. Initiate a task during idle CPU time.
> > c. Create a one off task for execution on a specified date/time.
> > d. Create Recurring tasks.
> > e. Initiate a task when a user connects/disconnects from a database.
> > f. Ability to disable/enable tasks.
> >
> >
> I don't see the need or the desirability for these. Can you give some
> scenarios?
example, but some one in the future might ask for it.
c. If I was asked to produce a one off report, scheduled for a
specific date time I could create the task and ignore it until run.
d. Nightly maintenance, data pruning/validation etc etc.
f. I was thinking of this in similar terms to a trigger, where it
could be ACTIVE/INACTIVE.
> You need more than this. Daily isn't good enough -- you need tospecify
> when. Backups, for example, are best done when everyone reasonable isIn the original doc:
> asleep.
Recurring tasks should also have the ability to be scheduled once per
period at a specified time, or scheduled to run at different, user
specified intervals.
So you would definately need to include an execution date/time.
> >Each recurring task should have an optional begin/end date, if nocancelled?
> >begin/end date is specified then the assumption should be made that
> >the task will always be executed.
> >
> >
> Wouldn't it be simpler to run a task regularly until explicitly
For simplicity maybe, but you might want to update or manipulate
records daily between 0800hrs and 1700hrs whilst your employees are on
site, rather than continuously. Just a thought.
> Even Paul Beach eventually mastered the tortured syntax, and he's aLOL
> marketing guy.
>Agreed.
> Again, this is more complexity than is needed. It would be simpler to
> call a procedure and let it do the step management, send email, error
> handling, etc.
> >6. Notifications.Maybe, would need to add UDF though so you could send an email or
> >
> >When a FIST completes an optional method of notification should be
> >issued. This should include:
> >
> > a. Ability to email a user.
> > b. Ability to add an entry to a log file.
> Let the task procedure handle this. There's no reason to build it into
> the infrastructure.
write a log entry etc. Personally though, I think notification is
important.
> >9. Management.Even better, much simpler and easier to use :-)
> How about:
>
> CREATE TASK <name> PROCEDURE <procname> SCHEDULE <schedule>
>
Perhaps adding another one
EXECUTE TASK <name>;
> I also think you have to make a case for non-times tasks.I don't fully understand this, do you mean manually execute a
procedure as and when need arises?
rgds
Si