pythonworkload-schedulerautomicuc4

Create a Job in UC4 (Automic Workload Automation) scheduler to execute python script


I watched documentation on UC4 (automic automation) but couldn't find the help where I can create a job and execute my python script.

I have developed on python script for web scrapping. This script doesn't required any input parameters. I want to create on job on UC4 in which this job will execute this python script. also I have to execute this python script. where I have to save this file in order to execute this script. because we have 4 environments for UC4.

PS - I am using UC4 web interface version is "Automic web interface 21.0.8". I am very much new to UC4 hence step by step approach would be highly appreciated. Thank you !


Solution

  • The first question is: Do you have an Automic agent installed on the host where you want to execute the python script? If not, you cannot execute anything on that host. Your agents can be found in the Administration view of the AWI. There you select Agents and Groups. It shows a list of all installed agents, on what platform they run, the IP-address and some other information. So, if you find an Agent for your host there, you can continue.

    In the Process Assembly, click on Add Object, and in the window that pops up select Job (JOBS) and UNIX job resp. WIN Job (depending on the OS on the host), and then click Add. You can now give your job a name or keep the standard name.

    enter image description here

    That's how such a job looks: enter image description here

    Here you add your agent and a login object in the according fields. A login object is created like the job by clicking Add Object and selecting Login (LOGIN). I think it is self-explanatory when you open such a login object what to fill in.

    Now you can write your code in the Process tab of the job. Running just one python script looks, e.g., so: enter image description here

    But here you can also use the Automic Script Language to add some logic here. A reference to scripting you can find here.

    This is of course only a very short explanation. If you want to do more, you should consider getting a training. Automic is a mighty tool. We use it to load data to databases, executing scripts (sh, py, ...) on different host, transferring files. You have WebService Jobs in Automic, Jobs for Amazon S3, SAP, or Bigquery. A detailed description would go well beyond the scope of this forum. Learn and play around.