Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Tying into Agent scheduling -- want to run query once a day
Kristy_Smith_(SCorUser4_(Delete)_1430871)
I'm looking for a way to run a script on a schedule -- i.e. once a day.Has anyone found a way to run a script at a set time every day? If so, how? My e-mail address is Kristy.L.Smith@mail.sprint.com. Any help at all would be greatly appreciated.I'm reading through LLAGENT in hopes of successfully orphaning & using the Agents object, but since there is zero documentation for it I'm working blind. I don't want to waste hours deciphering undocumented code if this isn't the best route to go.
Find more posts tagged with
Comments
Scott_Chate_(schate_-_(deleted))
I believe you are the right track. When designed, the Change Agents were designed to be fairly generic, so that evemtually the process that was kicked off periodically could be anything, not just the process that checks the event logs and compares them with people subscription settings to construct messages. Open Text has re-written or heavily modified this code from its first incarantion, but I'm pretty sure the prinicipal still holds.You'll just need to clone or orphan the parts that you need and change the actual agent behaviour to run your script instead of the script that goes out and checks event logs. You may find it easiest to setup a pseudo-user that can set a schedule for this process using the same schedule setting interface that is used for Change Agents, that way you could adjust schedules easily through the interface. Similarly, the orginal design envisioned using the Object subscription interface to select which object was 'affected'. The ability to pick a specific object as opposed to a type wasn't there then, but now that it is, the idea would be to place the script to be executed in the Admin user's workspace as a 'document' and have the Agent run it according to the schedule. This allows the flexibility of updating the script by simply replacing it in the workspace.I haven't looked at the code for this since version 3 of Livelink, so I doubt I would be much help on specifics, but you might send a note to Mike Oliver at Open Text, he worked on the original version and would know who has been working on it since and might be able to point you in the right direction.
Thomas_Wong_(Imvec_(Delete)_1087515)
I am interested in this topic and I am not quite understand part of your answer. Could you explain it again?You wrote:"Similarly, the orginal design envisioned using the Object subscription interface to select which object was 'affected'. The ability to pick a specific object as opposed to a type wasn't there then, but now that it is, the idea would be to place the script to be executed in the Admin user's workspace as a 'document' and have the Agent run it according to the schedule. This allows the flexibility of updating the script by simply replacing it in the workspace."
Scott_Chate_(schate_-_(deleted))
The orginal design envisioned the capability to subscribe to a specific object, but all that was implemented at the first stage was specific object types ( documents, tasks, discussions , etc. ). This was ok, but often resulted in Change Agents being 'ON' for things you didn't care about so much. The improvements Open Text made to Change Agents have allowed a user to specify a specific instance of an object type for inclusion to the Change Agents subscription list. For instance, now you can subscribe to one project and not another, one folder or discussion and not another, or even one single document. This ability to select a single document and subscribe to it in your Change Agents preferences is the mechanism that we had thought of using for specifying a particular process to run. If the 'document' was actually an Oscript, it could be specifically targeted, just like you could specifically subscribe to it via Change Agents.Only in this case, instead of the Change Agents process(es) that start up on schedule and looks at event logs and user subscriptions and schedules, there would be a Process Agent that would look in the Process Agents Preferences for the user ( which would probably be the admin user for system wide processes but could be others I suppose ) and according to the schedule there, look through the folder of Scheduled Process 'documents' and execute the ones that should be executed. Whether they should be executed could be based on document Attributes for the category of documents called 'Scheduled Process', which would have attributes like which schedule they followed ( the schedule A, B or C that is setup in the users preferences, similarly to a users Notifications schedule ), a userid and password if they need a different one to do the work, even parameters that will be used by the process.This gives a fair degree of control and flexibility while reusing much of the Change Agents infrastructure. Admittedly, the schedules are restricted to the three available in preferences, so if you had 12 different processes you could have them on only 3 different schedules; but if a process really needed more fine control there are ways to do that by having the Process Agent process itself check that documents own rules ( perhaps in its attributes ) to decide whether to actually execute that particular Oscript. It seemed a reasonable tradeoff.Structure:- Process Schedule Preferences - like the Change Agents Schedule preferences, can set days of week and times of day.- Scheduled Process folder - contains a folder for each schedule A,B,C [example - Hourly, Twice daily, Weekly] which contain the 'documents' with a Category of 'Scheduled Process' which are in fact Oscripts. Other documents can be put here too, documentation and instructions, perhaps report and log outputs of the various processes, as long as they don't have the category attribute of 'Scheduled Process' the Process Agent won't pay any attention to them, so they won't cause any problems.[Schedule Process folder ] [ Schedule A folder ] [ Late Task Pager program ] [ Janes Special program ] [ Schedule B folder ] [ Schedule C folder ] [ Space Usage report ] [ User Activity report ]- Process Agent - runs every 5 minutes and checks the ( Admin users ) Process Agents Schedule preferences. If the current time is 'ON' in the Schedule A, the Process Agent examines the 'Scheduled Processes Folder' for Schedule A and looks for documents with the Category of 'Scheduled Process'. It then picks them up, examines the attributes for further instructions, parameters and perhaps further instructions [ example: only run if it is the last day of the month and after 8:00 PM GMT ( this could be written as Oscript code) ]---------Hope this helps clarifyScott Chate
Kristy_Smith_(SCorUser4_(Delete)_1430871)
Very interesting info. Thanks for taking the time to look into this. I hope to do some experimentation soon!