⏯️ Actions¶
To see available actions, run help or show actions.
Add -h to a command or preface with show help to learn more.
Custom actions
Use the @make_action decorator to make your scripts into custom actions.
Actions are commands for managing your Meerschaum instance and are a great way to perform bulk operations.
Syntax¶
Actions follow a simple verb-noun syntax (singular or plural):
Run mrsm (python -m meerschaum) to execute actions from the Meerschaum shell:
Or run actions directly from the command line:
Chaining Actions¶
Join actions with + to run them in a single process (similar to && in bash):
Flags added after : apply to the entire pipeline:
show version + show arguments : --loop
sync pipes -c plugin:noaa + \
sync pipes -c sql:main : -s 'daily starting 00:00' -d
You can escape
:with::, e.g.mrsm echo ::will output:.
Here are some useful pipeline flags:
--loop
Run the pipeline commands continuously.--min-seconds(default1)
How many seconds to sleep between laps (if--looporx3).-s,--schedule,--cron
Execute the pipeline on a schedule.-d,--daemon
Create a background job to run the pipeline.x3,3
Execute the pipeline a specific number of times.
Note that you can add : to single commands as well:
Daemonize Actions¶
Add -d to any action to run it as a background job.
This works well when chaining actions to create a pipeline job:
bash Actions¶
Any bash command may be run as an action. This is a great way to run shell scripts through Meerschaum.