Answer:
This article explains what a cron job is and how to configure one in Plesk on GHFS Hosting. Cron jobs allow your server to run automated tasks on a schedule.
1. What Is a Cron Job?
A cron job is an automated task that runs at specific intervals.
It can trigger scripts or commands without manual input.
Common uses include:
-
Running backups automatically
-
Clearing cache files
-
Executing PHP scripts
-
Updating applications or databases
-
Running scheduled tasks for CMS platforms (WordPress, Joomla, etc.)
Cron jobs ensure that scheduled actions happen consistently and automatically.
2. How to Set Up a Cron Job in Plesk
Steps:
-
Log in to your Plesk control panel
-
Go to Tools & Settings or Websites & Domains (depending on your plan)
-
Click Scheduled Tasks
-
Select Add Task
-
Choose the type of task:
-
Run a command
-
Run a PHP script
-
Fetch a URL (if supported)
-
-
Set the schedule using:
-
Minute
-
Hour
-
Day
-
Month
-
Day of week
-
-
Enter your command or script path
-
Click OK to save the task
Your cron job will now run automatically according to the schedule.
3. Common Examples of Cron Commands
Running a PHP script:
Fetching a script via URL (if allowed):
Running a shell command:
Always adjust file paths and PHP versions to match your server configuration.
4. Understanding Cron Timing (Schedule)
Cron timing uses five fields:
Examples:
-
Every 5 minutes:
-
Daily at midnight:
-
Once per hour:
5. When to Contact GHFS Hosting Support
Contact support if:
-
Your cron job is not running
-
You do not know which command to use
-
You need help creating script paths
-
Your CMS requires specific scheduled tasks
-
Permissions or resource limits are causing failures
Support can verify logs, correct paths, and help configure the correct cron command.