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 SCHEDULED status 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.com
  • CRON_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.sh

Manual 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.

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:

  1. CRON_API_KEY and APP_URL environment variables are correctly defined.
  2. The /app/scripts/update-launches.sh script is executable.
  3. The /api/cron/update-launches API is accessible.
  4. Application logs to see potential errors.
Cron Launches