Automated Cron Scheduler APIs

Raw MD
Schedule recurring tasks, daily bonuses, and background worker scripts down to 1-minute intervals.

1. List Cron Jobs (list_crons)

Action: list_crons
Parameters: bot_id
Returns array of scheduled crons with their ID, crontab expression, target file, and execution status.

2. Create Cron Job (create_cron)

Action: create_cron
Parameters: bot_id, cron_name, schedule (e.g. 0 0 * * * for midnight), target_file (e.g. cron.php)

cURL Create Cron
curl -X POST https://botlify.cloud/user_api.php   -H "X-API-KEY: YOUR_KEY"   -H "Content-Type: application/json"   -d '{
    "action": "create_cron",
    "bot_id": 14,
    "cron_name": "Daily Reward Reset",
    "schedule": "0 0 * * *",
    "target_file": "cron.php"
  }'

3. Toggle & Delete (toggle_cron / delete_cron)

Action: toggle_cron (params: bot_id, cron_id)
Action: delete_cron (params: bot_id, cron_id)

4. Trigger Immediate Run (run_cron)

Action: run_cron (params: bot_id, cron_id). Manually triggers the worker and returns stdout output and execution duration.