Running a daily SQL routine

Questions and answers regarding general SQL and backend databases

Running a daily SQL routine

Postby Morley » Tue Mar 15, 2005 3:17 am

Is it possible to call a Servoy Method daily from a stored procedure? Here's why I'm asking.

I want an existing, fairly complex method to run daily at midnight across all the records of a Sybase database, whether or not any end users are currently logged in.

This would be easy to create using the Cron scheduler, but apparently this plug-in only functions from Servoy Client. No clients running, the routine doesn't trigger. Five or 50 users currently logged in and the routine runs five or 50 times -- wild overkill and/or possible conflicts.

It's been recommended I get around this plug-in's limitation by using a SQL stored procedure. Crafting native SQL calls is not a comfortable area for me (which is why I'm working within Servoy).

Therefore, can I make a call from a Sybase stored procedure to run a Servoy method daily at midnight?

Kind regards,
Morley Chalmers
7Office Inc.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Re: Running a daily SQL routine

Postby bubba » Tue Mar 15, 2005 4:09 pm

Morley wrote:Is it possible to call a Servoy Method daily from a stored procedure? Here's why I'm asking.

I want an existing, fairly complex method to run daily at midnight across all the records of a Sybase database, whether or not any end users are currently logged in.

This would be easy to create using the Cron scheduler, but apparently this plug-in only functions from Servoy Client. No clients running, the routine doesn't trigger. Five or 50 users currently logged in and the routine runs five or 50 times -- wild overkill and/or possible conflicts.

It's been recommended I get around this plug-in's limitation by using a SQL stored procedure. Crafting native SQL calls is not a comfortable area for me (which is why I'm working within Servoy).

Therefore, can I make a call from a Sybase stored procedure to run a Servoy method daily at midnight?

Kind regards,


Morely:

I'm not a Sybase guy, but Oracle has the ability to schedule and run stored procs on the server, independent of anything else. I'm pretty sure Sybase has a similar function.

Regards,
Lee Snover
bubba
 
Posts: 227
Joined: Thu Aug 19, 2004 5:42 pm
Location: Bath, PA

Re: Running a daily SQL routine

Postby Morley » Tue Mar 15, 2005 7:38 pm

leesnover wrote:I'm not a Sybase guy, but Oracle has the ability to schedule and run stored procs on the server, independent of anything else. I'm pretty sure Sybase has a similar function.
I'm sure it does. That wasn't really the question.

I already have a routine written in in JS within Servoy and it works. Writing the equivalent again as SQL calls gives me the willies, especially as the routine is fairly involved and includes multiple tables and loops.

I was hoping against hope I could make a call on the existing JS routine. I know that's not likely, but then occasionally there are surprises.

I need this routine to run as a Stored Procedure because Servoy's Scheduler Plug-in works only with Servoy Client. I don't want this routine to run 50 times if 50 clients happen to be open.
Morley Chalmers
7Office Inc.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 6 guests