goractor

module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: MIT

README ΒΆ

Goractor πŸš€

A robust SQL scheduling task manager that helps you automate SQL queries and deliver results to various destinations.

Go Report Card License

Features ✨

  • πŸ•’ Schedule SQL queries with flexible timing options
  • πŸ“Š Export results in CSV format
  • πŸ”„ Systemd integration for reliable scheduling
  • 🎯 Multiple destination support
  • πŸ’Ό Easy configuration management

Installation

go install github.com/ONCALLJP/goractor/cmd/goractor@latest

Quick Start πŸš€

  1. Create a task:
goractor task add
  1. Install the scheduler:
goractor systemd install task1
  1. Check status:
goractor systemd status

Task Configuration Example πŸ“

tasks:
  my_task:
    name: my_task
    schedule: "every_5min"  # or "daily 09:00"
    query:
      name: user_stats
      sql: |
        SELECT 
          date_trunc('day', created_at) as date,
          count(*) as total
        FROM users
        GROUP BY 1

Available Commands πŸ› οΈ

  • Task Management:

    goractor task add
    goractor task list
    goractor task remove [task-name]
    
  • Scheduler Management:

    goractor systemd install [task-name]
    goractor systemd restart [task-name]
    goractor systemd disable [task-name]
    
  • Debugging:

    goractor debug [task-name]
    

Scheduling Options ⏰

  • every_5min: Run every 5 minutes
  • every_hour: Run every hour
  • daily HH:MM: Run at specific time daily
  • weekly Mon,Wed,Fri HH:MM: Run on specific days
  • monthly DD HH:MM: Run on specific day of month

Contributing 🀝

Contributions are welcome! Here are some ways you can contribute:

  1. πŸ› Report bugs
  2. πŸ’‘ Suggest new features
  3. πŸ”§ Submit pull requests

License πŸ“„

MIT License - see the LICENSE file for details

Directories ΒΆ

Path Synopsis
cmd
goractor command
internal
destination
File: internal/destination/prompt.go
File: internal/destination/prompt.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL