🕐 Automatic Draw Setup Guide

📋 Overview: To run draws automatically every 2 days at 10:00 AM IST, you need to set up a cron job that calls the draw script.

Method 1: Server Cron Job (Recommended)

Step 1: Access your server's crontab
crontab -e
Step 2: Add this line to run the draw script every day at 10:00 AM IST
0 10 * * * /usr/bin/php /path/to/your/website/draw.php >/dev/null 2>&1
📝 Note: Replace /path/to/your/website/ with the actual path to your website files. The script will automatically check if it's time for a draw before executing.
Step 3: Save the crontab file and verify it's active
crontab -l

Method 2: Web-based Cron (Alternative)

Step 1: Use a web-based cron service like:
Step 2: Set up the cron job to call this URL every day at 10:00 AM IST:
https://yourdomain.com/draw.php
Step 3: Set the schedule to: 0 10 * * * (daily at 10:00 AM)

Method 3: cPanel Cron Jobs

Step 1: Login to your cPanel
Step 2: Go to "Cron Jobs" under "Advanced" section
Step 3: Create a new cron job with these settings:

🔧 Alternative: Manual Trigger Script

If you can't set up cron jobs, you can create a script that checks and runs draws when someone visits your website:

<?php // Add this to your index.php or any frequently visited page require_once 'config.php'; require_once 'draw.php'; if (isDrawTime()) { // Run draw in background (you might want to use exec() or similar) $result = conductDraw(); // Optionally log the result } ?>

📊 Testing Your Setup

Test the draw script directly:
php draw.php
Or visit: https://yourdomain.com/draw.php?force=1
Check cron job logs:
grep CRON /var/log/syslog

⚠️ Important Notes

🎯 Draw Logic

How it works:

📞 Need Help?

If you're having trouble setting up the cron job: