Cron Configuration
Cron is a time-based job scheduler in Unix-like operating systems. It allows users to schedule jobs (commands or scripts) to run at specific intervals or times. In the context of Text Club, setting up cron jobs is essential for automating tasks such as sending scheduled messages, processing incoming messages, and performing regular maintenance tasks.
Follow the steps below to set up cron jobs for Text Club:
  1. Determine the installation path of PHP on your server. The default value of /usr/local/bin/php is pretty sufficient for most installations. If you are unsure of your server's PHP installation path, you can find it by running the following command in your terminal: which php
  2. Enter the php installation path obtained in step 1 into the PHP Path input box
  3. Click the Submit button at the bottom of the page to save your changes
Add the Cron Job
Next you will add the cron to your server's crontab. Follow the steps below to add the cron job:
  1. Copy the Cron URL
  2. On CPanel, search for cron and click on the Cron Jobs icon.
  3. In the Add New Cron Job section, select the desired time interval for the cron job to run. It is recommended to set the cron to run every 1 minute. If you want the cron job to run every 5 minutes, select Every 5 Minutes from the dropdown menu.
  4. In the Command field, enter the following command, replacing YOUR_CRON_URL with the cron URL you copied in step 1.
  5. Click the Add New Cron Job button to save the cron job.
  6. You should see a confirmation message indicating that the cron job has been added successfully.
  7. You can verify that the cron job is working by checking the Cron Reports page in Text Club. This page will show you the status of the cron job and any errors that may have occurred.
  8. If you encounter any issues with the cron job, check the server logs for any error messages. You can also try running the cron job manually by entering the command in your terminal.
  9. If you are using a different hosting provider, the steps to add a cron job may vary. Check your hosting provider's documentation for specific instructions on how to add a cron job.
  10. If you are using a VPS or dedicated server, you can add the cron job directly to the crontab file by running the following command in your terminal:
    crontab -e
    This will open the crontab file in your default text editor. Add the cron job command to the file and save it.