{
  // Workflow metadata
  "name": "Simple Workflow with Actions",

  "description": "Demonstrates scheduler actions for different workflow stages",

  // Job definitions
  "jobs": [
    {
      "name": "setup",
      "command": "echo 'Setting up...' && sleep 2"
    },
    {
      "name": "process",
      "command": "echo 'Processing data...' && sleep 5",
      "depends_on": [
        "setup"
      ]
    },
    {
      "name": "finalize",
      "command": "echo 'Finalizing...' && sleep 2",
      "depends_on": [
        "process"
      ]
    }
  ],
  
  // Workflow actions
  "actions": [
    {
      "trigger_type": "on_workflow_start",
      "action_type": "run_commands",
      "commands": [
        "echo 'Workflow started at $(date)' > workflow_log.txt",
        "mkdir -p output temp",
        "echo 'Environment ready'"
      ]
    },
    {
      "trigger_type": "on_workflow_complete",
      "action_type": "run_commands",
      "commands": [
        "echo 'Workflow completed at $(date)' >> workflow_log.txt",
        "echo 'Cleaning up temporary files...'",
        "rm -rf temp",
        "echo 'Archiving results...'",
        "tar -czf output/results.tar.gz workflow_log.txt",
        "echo 'Workflow cleanup complete'"
      ]
    }
  ],

}
