GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing dolphinscheduler.apache.org — Shell — apache-dolphinscheduler 4.1.0-dev documentation ShellA shell task type’s example and dive into information of PyDolphinScheduler. Examplewith Workflow( name="tutorial", schedule="0 0 0 * * ? *", start_time="2021-01-01", ) as workflow: # [end workflow_declare] # [start task_declare] task_parent = Shell(name="task_parent", command="echo hello pydolphinscheduler") task_child_one = Shell( name="task_child_one", command=""" echo "Executing line 1 with parameter str type ${param1}" echo "Executing line 2 with parameter int type ${param2}" echo "Executing line 3 with parameter build-in parameter currently date ${param3}" """, params={"param1": "str1", "param2": 123, "param3": "$[yyyy-MM-dd]"}, ) task_child_two = Shell(name="task_child_two", command="echo 'child two'") task_union = Shell(name="task_union", command="echo union") # [start resource_limit] resource_limit = Shell( name="resource_limit", command="echo resource limit", cpu_quota=1, memory_max=100, ) # [end resource_limit] # [end task_declare] # [start task_relation_declare] task_group = [task_child_one, task_child_two] task_parent.set_downstream(task_group) resource_limit << task_union << task_group Resource Limit ExampleWe can add resource limit like CPU quota and max memory by passing parameters when declaring tasks. resource_limit = Shell( name="resource_limit", command="echo resource limit", cpu_quota=1, memory_max=100, ) Dive IntoTask shell.
YAML file example# Define the workflow workflow: name: "Shell" release_state: "offline" run: true # Define the tasks within the workflow tasks: - name: task_parent task_type: Shell command: | echo hello pydolphinscheduler echo run task parent - name: task_child_one task_type: Shell deps: [task_parent] command: echo "child one" - name: task_child_two task_type: Shell deps: [task_parent] command: echo "child two" |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |