How do I create and manage cron jobs in SiteWorx? Print

  • 0

In short: Create scheduled tasks in SiteWorx under Hosting Features > Cron Jobs. Use an absolute command path, run the job no more often than necessary, and capture output so failures are visible.

Create a cron job

  1. Sign in to SiteWorx and open Hosting Features > Cron Jobs.
  2. Choose the Simple interface unless you are comfortable with standard cron notation.
  3. Select the minute, hour, day, month and weekday schedule.
  4. Enter the complete command or script path.
  5. Add the job, then test its command manually or use a temporary safe schedule.

Use reliable commands

  • Use absolute paths such as /usr/bin/php and the complete path to the script.
  • Quote paths or arguments containing spaces.
  • Choose the PHP binary that matches the application where required.
  • Do not rely on an interactive shell profile or current directory.
  • Prevent concurrent runs when the application does not handle overlap safely.

Capture failures

Set the cron Mailto option to a monitored address or redirect output to an application log. A quiet job should still record errors and an expected completion status.

Start conservatively: A job running every minute can overlap, send excessive mail or consume account resources. Confirm one run completes before increasing frequency.

Common reasons a cron works manually but not automatically

  • The executable or script path is relative.
  • The cron environment has a different PATH or PHP version.
  • Required environment variables are absent.
  • The working directory or file permissions differ.
  • The command is waiting for interactive input.

Further guidance

See the official InterWorx guide to managing scheduled tasks with cron.


Was this answer helpful?

« Back