GoCron
A task scheduler built with Go and Vue.js that allows users to specify recurring jobs via a simple YAML configuration file.
安装次数
点赞
应用评论
催更次数
桌面端



应用描述
A task scheduler built with Go and Vue.js that allows users to specify recurring jobs via a simple YAML configuration file. The scheduler reads job definitions, executes commands at specified times using cron expressions, and passes in environment variables for each job. Features Simple Configuration: Easily define jobs, cron schedules, and environment variables in a YAML config file. Cron Scheduling: Supports cron expressions for precise scheduling. Environment Variables: Define environment variables specific to each job. Easy Job Management: Add and remove jobs quickly with simple configuration. Pre-installed backup-software for an easy backup solution How It Works Defaults Section: This section defines default values that are applied to all jobs. You can specify a default cron expression and environment variables to be inherited by each job. Jobs Section: Here, you define multiple jobs. Each job can have its own cron expression, environment variables, and commands to execute. Environment Variables: Define environment variables for each job to customize its runtime environment. Commands: Each job can have multiple commands, which will be executed in sequence. to add tasks,you should edit the config.yml file in config folder under the app data,ref this config below defaults: # every job will be appended to this cron and the jobs will run sequentially cron: '0 3 * * *' # Runs daily at 3:00 AM # global envs to use in all jobs envs: - key: RESTIC_PASSWORD_FILE value: '/secrets/.resticpwd' - key: BASE_REPOSITORY value: 'rclone:pcloud:Server/Backups' - key: APPDATA_PATH value: '/mnt/user/appdata' jobs: - name: Notify at 2AM cron: '0 2 * * *' # Runs daily at 2:00 AM commands: - command: apprise "mailto://you@example.com" -t "Daily Notification" -b "This is your 2AM notification from GoCron." - name: Example cron: '0 5 * * 0' # Runs daily at 5:00 AM commands: - command: ls -la - command: sleep 1 - command: echo "Done!" - command: sleep 1 - name: Test envs: - key: BACKUP_PATH value: '/app/config/test' commands: - command: mkdir -p ${BACKUP_PATH} - command: rm -rf ${BACKUP_PATH}/* - command: echo 'Hello World' > ${BACKUP_PATH}/backup.md - command: stat ${BACKUP_PATH}/backup.md - command: cd ${BACKUP_PATH} && find . -maxdepth 1 -name backup.md -mmin -1 | grep -q . && echo 'FILE RECENTLY GENERATED' - name: Set envs envs: - key: BACKUP_PATH value: '/app/config/test' - key: RESTIC_REPOSITORY value: '$BASE_REPOSITORY/Backups' commands: - command: echo $RESTIC_PASSWORD_FILE - command: echo $RESTIC_REPOSITORY
懒猫评分/评论
0.0
0 条评论
新功能
版本历史记录"first commit"
此 App 尚未收到足够的评分或评论,无法显示评论列表。