a cron system for sybase 
Author Message
 a cron system for sybase

We have an inhouse system here that BSG developed a while back.

It selects against a certain table, and when it finds a
new entry, spawns a process to run the command mentioned
in the table. This makes it easy to write a report that
in turn generates (dynamically) other reports for our
user base.

The scheduler has a few problems; it uses ps to track
children (instead of SIGCHLD or kill), and it has no real maxjob
locking mechanism.

Now, I plan to re-write this thing from the ground up and release
it into the public domain. I have just two questions. 1) Does
anyone really need something like this besides me? :-)
2) It seems like I heard there was a db/library bug about constantly
opening and closing dbproc processes which eventually made you run
out of them? Is this true?

--

``But as I said, it's speculation on my part, not "the truth".''
   -- David Sternlight        



Tue, 26 Dec 1995 23:12:33 GMT
 a cron system for sybase

Quote:

>We have an inhouse system here that BSG developed a while back.

>It selects against a certain table, and when it finds a
>new entry, spawns a process to run the command mentioned
>in the table. This makes it easy to write a report that
>in turn generates (dynamically) other reports for our
>user base.

>The scheduler has a few problems; it uses ps to track
>children (instead of SIGCHLD or kill), and it has no real maxjob
>locking mechanism.

>Now, I plan to re-write this thing from the ground up and release
>it into the public domain. I have just two questions. 1) Does
>anyone really need something like this besides me? :-)

Yes, I may need it.  Our reports usually have parameters.  Therefore it's
interactive with users.  However, they're not "urgent" reports.  We wish
to delay the reports to run after bussiness hours.  Our plan is to save
parameters in a table and, in the evening, a cron job will pull them out
and assemble them to UNIX commands.  It's not hard to do since our
current reports' parameter lists are simple.  But who knows what strange
reports will crop up over years.  I think there must be other people who
will appreciate a utility to do those things.

--

Vincent Q. Yin



Wed, 27 Dec 1995 06:10:23 GMT
 a cron system for sybase
:
: Now, I plan to re-write this thing from the ground up and release
: it into the public domain. I have just two questions. 1) Does
: anyone really need something like this besides me? :-)
:

I developed something like this a few months ago.  It was a little
more like a traditional "cron" system than what you have described.
It consisted of a "master schedule" of SQL statements along the lines
of a crontab file (with the addition of a username and what to do with
the output, etc).

I wrote a daemon that built a "working schedule" a week into the
future based on this "master".  Every so often it would scan the
working schedule to look for jobs to run similar to how cron works.
The appeals of this approach were:

        1. Any "normal" user could schedule SQL to be run under his
        Sybase user id.

        2. If the dataserver was down for a day and missed running
        some important jobs, the "working schedule" would be used
        to catch back up in a lock step fashion.  This is a departure
        from "cron" behaviour but it is a nice feature (almost a
        requirement) for a production environment.

I had the stuff mostly working including concurrency.  It turns out
that we haven't had much call for it yet.  Also, System 10 will pose
problems for appeal #1 above since the daemon selected user passwords
from system tables in order to perform actions on the user's behalf.
Of course under System 10, these passwords will be encrypted...

I would be interested in seeing what you have done and I'm sure others
would also.

--

Unix Systems Programmer                            | Phone: (919) 515-2794  |
NCSU Administrative Computing Services             | FAX:   (919) 515-3787  |



Sat, 30 Dec 1995 02:04:39 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. sybase cron backup

2. Cron in sybase?

3. Scripts to shut down and restart Sybase from a cron job

4. system error code 127 while loading ODBC Sybase system 11

5. Database Administrator for Sybase System 10 (future System 11) needed in San Diego California

6. IA-Cedar Rapids Area-258899--ORACLE-SYBASE-SQLSERVER-Systems Analyst - Oracle, Sybase, SQL server

7. IA-Cedar Rapids Area-258899--ORACLE-SYBASE-SQLSERVER-Systems Analyst - Oracle, Sybase, SQL server

8. Sybase Contractor needs job in Boston area - Oracle/Sybase/Financial Systems experience

9. Sybase Contractor needs job in Boston area - Sybase/Oracle/Financial Systems experience

10. Downgrading a Sybase System 10 database to Sybase 4.X database

11. Vacuum Analyze - CRON script running correctly?


 
Powered by phpBB® Forum Software