Skip to main content

Command Tasks


A primitive task that runs a shell command. However, it needs to be only one command. Meaning that you won't be able to do something like this:

echo "Wait for it..." && echo "-dary."

If you want to execute multiple commands, you'd do:

$ cat << EOF >
> echo "Wait for it..." && echo "-dary!"

That way, you can execute the shell script.

$ /bin/bash


StewardX will execute the command you've added, so in this case it'll execute /bin/bash To not encounter any path problems, you'd want to indicate the absolute path of the script you created, like:

/bin/bash /home/stewie/


StewardX will send the SIGKILL signal to the process.


Property nameProperty TypeDefinition
commandStringCommand to execute

Creating by API#

The task creation route is /tasks. Sending a POST request with required parameters will do.


Property nameProperty TypeDefinition
commandStringCommand to execute

Other parameters are the same as every task:

  • task_name: Name of the task (not type)
  • frequency: Frequency of task, currently Hook and Every(*cron string*)
  • task_type: Task type - in this case it's CmdTask

cURL example:

$ curl --header "Content-Type: application/json" -X POST --data '{"task_name": "Smile and wave", "frequency": "Hook", "task_type": "CmdTask", "task_props": {"command":"echo hello ๐Ÿ‘‹"}}' http://localhost:3000/tasks