Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Julien
2011-06-09T10:53:23Z
Hello,

I've got a new challenge that requires some help!

Here's the idea: I would like to let some users to define when they want their jobs to run.

Unfortunately, for security purpose, those users do not have access to VisualCron (and i dont want to give access).

Up to now, I was deciding when the different jobs need to run, but I would propose something more flexible.

So, I was thinking to setup the schedule in an Oracle table (with the name of the job to run and a time for refreshing, for example, every day at 8 a.m)

In visual cron, I've done a SQS Job to query this Oracle table every 10 minutes. So, I am able to find the list of job to run at a specific time. To avoid to run twice the same job, I plan to record the last time the job has been run.

Here's my problem: even if I've got a list of job to run, I don't know how to continue. The goal is, if I find 2 jobs qith my query, to launch 2 distinct processes (one per job) because I don't want to wait the first job to complete before launching the second one.

Do you have any idea on how to do that?

Thanks in advance for the help you may provide!
Sponsor
Forum information
Support
2011-06-09T10:59:09Z
It might be a big step between having a table with your own date format and VisualCron do inteprete that format and turn it into a Time Trigger.

The VisualCron server cannot create Triggers with the help of Tasks. The only way to achieve this, and maybe the easiest, is to build a web interface where you use the VisualCron API to set/create a Trigger. That said, you will still have a challenge in making it work the way you want it.

In a near future version you can give specific access to specific Jobs. Maybe that is what you are looking for. Then you can hand out a user that can only access those Jobs.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Julien
2011-06-09T11:48:52Z
Support wrote:

It might be a big step between having a table with your own date format and VisualCron do inteprete that format and turn it into a Time Trigger.



The idea would not be to change the trigger of existing jobs, but rather lauching a process from a VisualCron job.

Example:
My Oracle table contains that:
ID   EXE_FILE      SCHEDULE_TIME   LAST_RUN_TS
1    c:\pgm1.exe   10:30           null
2    c:\pgm2.exe   11:00           null


A VC job run every 5 minutes and query this table like that:
select distinct EXE_FILE from my_oracle_table
where to_date((to_char(sysdate,'DDMONYYYY') || ' ' || SCHEDULE_TIME || ':00'), 'DDMONYYYY HH24:MI;SS') < sysdate
  and (LAST_RUN_TS is null or LAST_RUN_TS + 1 < sysdate)


This query extract all exe files to launch (but the exe file file are not configured now in any VS job/task)

So, the probelm I've got is to find a way to run "c:\pgm1.exe" following the query.

The other challenge is if pgm1 and pgm2 are scheduled at the same time, how to run pgm1 and pgm2 at the same time (i.e: I don't want to wait for the completion of pgm1 before starting pgm2)

Hope it's a more clear with this example

Julien
Support
2011-06-09T11:58:47Z
Ok, what you can do then is using the Variable from the output of the SQL Task in the Command field of the Execute Task:

{TASK(PrevTask,StdOut)}

As there currently is no loop method you need to pick only one at a time and perhaps update that row or something to make sure it has been run.

For simplicity I would schedule them 1 minute from each other.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top