Commands
Overview
Commands in Tapitalee are persistent job definitions that can be executed repeatedly, making them ideal for maintenance operations, data processing pipelines, monitoring tasks, and recurring business processes. Commands can be triggered manually or run automatically on a schedule.
Purpose and Benefits
- Scheduled Execution: Automatic execution based on cron schedules (see Scheduled Cronjobs)
- Manual Triggers: On-demand execution for testing and maintenance via Tapitalee web interface
- Resource Control: Configurable CPU, memory, and execution limits
- Audit Trail: Complete history of all command executions
- Environment Integration: Full access to app environment and resources
CLI Usage
Create Command
tapit create command name=command-name 'command to run' [schedule='cron-expression'] [memory|cpu|image|image_tag|max_hours|ephemeral_storage_gb]=value [description='text']Required Parameters
name: Command name (alphanumeric with hyphens)command: Shell command to execute (quoted string)
Optional Parameters
schedule: Cron expression for automatic scheduling (see Scheduled Cronjobs)memory: Memory allocation in GB (default: 2.0, sandbox limit: 1.0)cpu: CPU allocation in vCPUs (default: 1.0, sandbox limit: 0.25)image: Custom container imageimage_tagortag: Specific image tag to usemax_hours: Maximum execution time in hoursephemeral_storage_gb: Ephemeral storage allocation in GBdescription: Human-readable description of the command
Examples
# Manual command (no schedule)
tapit create command name=db-maintenance 'python scripts/cleanup_old_records.py' description='Remove old records from database'
# Scheduled command - see Scheduled Cronjobs for more examples
tapit create command name=daily-backup 'python scripts/backup_database.py' schedule='0 2 * * *' description='Daily database backup'Modify Command
tapit set command name=command-name ['new command'] [schedule='cron-expression'] [memory|cpu|image|tag|max_hours|ephemeral_storage_gb]=value [description='text']Modifiable Parameters
command: Update the shell command to executeschedule: Change or remove the cron schedulememory: Update memory allocationcpu: Update CPU allocationimage: Change container imagetag: Update image tagmax_hours: Modify execution time limitephemeral_storage_gb: Update ephemeral storage allocationdescription: Update description
List Commands
tapit list commandsShows all commands with their configuration and execution status.
Manual Command Execution
Commands can be executed manually regardless of their schedule using the task creation functionality:
# Execute a command manually by creating a task
tapit create task 'python scripts/backup_database.py'Delete Command
tapit delete command name=command-namePermanently removes a command definition and cancels any scheduled executions.