Welcome to the Webhook Plan repository! This is the core logic behind Webhook Plan, a powerful tool for effortless job scheduling and webhook management.
🤩 Easy Scheduling: Schedule your jobs with ease using Webhook Plan.
⏱️ Reliable Execution: Ensure your jobs are executed reliably and on schedule.
🪝 Webhook Management: Manage and customize webhook requests effortlessly.
🚀 Scheduling Options: Choose from wide verity of schedules -
- Interval: Schedule executing on a regular interval
- Crontab: Timezone Aware Crontab-like schedule
- Solar: Schedule following astronomical patterns
- Clocked: Schedule executing at a clocked time
To use production ready WebhookPlan on your project, just follow the steps -
-
Use the following
docker-compose.yamltemplate to run a dummy WebhookPlan instance.version: "3" services: redis: image: redis/redis-stack:latest restart: on-failure postgres: image: postgres:alpine env_file: - .db.env restart: on-failure webhookplan: image: webhookplan/webhookplan:latest container_name: webhookplan env_file: - .env ports: - "8000:8000" depends_on: - postgres - redis restart: on-failure webhookplan_celery_worker: image: webhookplan/webhookplan:latest command: sh -c "celery -A core.celery worker" env_file: - .env depends_on: - postgres - redis restart: on-failure webhookplan_celery_beat: image: webhookplan/webhookplan:latest command: sh -c "celery -A core.celery beat -S django" env_file: - .env depends_on: - postgres - redis restart: on-failure
-
Make sure to use the
example.envexample.db.envtemplates to prepare.envanddb.envrespectively..env
# django SECRET_KEY='django-insecure-_m4t+w29x^5$&7n$8+!x_e0&=qr5yej$7mpg^5*ummb=)q(6x!' # database DB_NAME='postgres' DB_USER='postgres' DB_PASSWORD='postgres' DB_HOST='postgres' DB_PORT='5432' # redis CELERY_BROKER_URL='redis://redis:6379' # jitter JITTER_MAX_RETRIES='27' JITTER_RETRY_BACKOFF='1' JITTER_RETRY_BACKOFF_MAX='576' JITTER_RETRY_JITTER='0'
.db.env
# postgres POSTGRES_USER='postgres' POSTGRES_PASSWORD='postgres' POSTGRES_DB='postgres' PGDATA='/var/lib/postgresql/data/pgdata'
Feel free to update these configurations at your convenience.
-
Once these 3 files are ready, you are good to go. Open the terminal and write the following command to run the docker containers.
$ docker compose up --build
-
Open 127.0.0.1:8000/swagger in your browser. 🚀
-
Schedule your webhooks using
/schedules/(POST) end-point.-
Use the following JSON to schedule a Task -
{ "name": "Get webhook request to webhook.site", "description": "Every 10 seconds, get webhook requests to webhook.site", "interval": { "every": 10, "period": "seconds" }, "webhook": { "url": "https://webhook.site/31c7aa21-62d0-48eb-b17f-6aa0a00a4649", "method": "POST", "payload": { "action": "webhook.generate_account_summary", "data": { "user_id": 101, "account_number": "8397496349234356" } }, "headers": { "Content-Type": "application/json", "Authorization": "Basic eyJ1c2VyX2lkIjogMTAxLCAibmFtZSI6ICJKb2huIERvZSIsICJlbWFpbCI6ICJqb2huLmRvZUB3ZWJob29rcGxhbi5jb20ifQ==" } } }NOTE: Use webhook.site for the testing/debuging purpose.
-
Hitting Execute, you'll see a Schedule has been created
- Open webhook.site. You'll see, Requests are now coming in the timely manner.
-
To contribute to Webhook Plan, follow these steps:
-
Fork the Repository: Click the 'Fork' button in the top right of this repository to create your own copy.
-
Clone Your Fork: Clone the repository to your local machine using
git clone.git clone https://github.com/<your-username>/webhookplan.git
-
Create a Branch: Create a new branch for your feature or bug fix.
git checkout -b feature-name
-
Make Changes: Implement your changes and test thoroughly.
-
Commit and Push: Commit your changes and push to your forked repository.
git commit -m "Your meaningful commit message" git push origin feature-name -
Submit a Pull Request: Open a pull request to the main Webhook Plan repository.
Webhook Plan is licensed under the BSD 3-Clause License.
Feel free to contribute, and thank you for being a part of the Webhook Plan community!



