Cron Launches
Cron Launches
Automatic Launch Update Configuration
This document explains how to configure the scheduled task to automatically update the launch statuses of channels at 8:00 AM UTC every day.
How it Works
The launch system works as follows:
- Channels are initially in
SCHEDULEDstatus with a programmed launch date. - At 8:00 AM UTC on the launch day, the status changes to
ONGOING. - At 8:00 AM UTC the next day, the status changes to
LAUNCHED.
Configuration on Coolify
1. Add Environment Variables
Add the following environment variables to your application on Coolify:
CRON_API_KEY=your_secret_key_here
APP_URL=https://your-domain.comCRON_API_KEY: A secret key to secure the API (generate a complex random string).APP_URL: The base URL of your application.
2. Configure the Scheduled Task
In Coolify, create a new scheduled task with the following parameters:
- Name:
update-launches - Command:
/app/scripts/update-launches.sh - Frequency:
0 8 * * *(every day at 8:00 AM UTC) - Container Name: The name of your application container.
3. Make the Script Executable
Ensure the script is executable by running this command in the container:
chmod +x /app/scripts/update-launches.shManual Test
To manually test the launch update, you can run:
curl -X GET \
-H "Authorization: Bearer your_secret_key_here" \
-H "Content-Type: application/json" \
"https://your-domain.com/api/cron/update-launches"Free/Nofollow Upgrade Campaign Cron (new)
Use this endpoint for the campaign that emails only free + nofollow projects scheduled to launch in about 12 hours (quick conversion action before launch):
curl -X GET \
-H "Authorization: Bearer your_secret_key_here" \
-H "Content-Type: application/json" \
"https://your-domain.com/api/cron/send-free-premium-upgrade-offer"Suggested schedule:
- Run hourly:
0 * * * *(recommended, catches all launch times with current 12-13 hour window). - Or run once daily at 20:00 UTC:
0 20 * * *(works well if most launches are 08:00 UTC).
Do not schedule send-ongoing-reminders (deprecated)
The endpoint /api/cron/send-ongoing-reminders used to send the same "🚀 {project} is Live on Aura++!" email as update-launches. If both run on launch day (e.g. 8:00 and 8:15 UTC), founders receive duplicate emails. Only update-launches should send the launch-day live email when status changes SCHEDULED → ONGOING. Remove any Coolify/cron job that calls send-ongoing-reminders.
Pinterest posting cron (new)
Pinterest pins are posted by a dedicated endpoint so launch story featured images are available first.
Suggested daily schedule (UTC):
8:00—/api/cron/update-launches(0 8 * * *)9:00—/api/cron/generate-blogs(0 9 * * *)9:30—/api/cron/post-pinterest(30 9 * * *)
Manual test:
curl -X GET \
-H "Authorization: Bearer your_secret_key_here" \
-H "Content-Type: application/json" \
"https://your-domain.com/api/cron/post-pinterest"This cron posts up to 2 Make webhook payloads per newly launched project:
- Project image (
coverImageUrl || productImage || logoUrl) - Launch story featured image (
ai_blog_post.featured_image) when available
Projects are marked with project.pinterest_posted = true after a successful run so they are not posted again.
Logging
Scheduled task logs are available in Coolify under the "Logs" tab of the scheduled task.
Troubleshooting
If the scheduled task fails, check the following:
CRON_API_KEYandAPP_URLenvironment variables are correctly defined.- The
/app/scripts/update-launches.shscript is executable. - The
/api/cron/update-launchesAPI is accessible. - Application logs to see potential errors.