Valentine's Day promotion background
14.Feb - 13.Mar 2026

Valentine deal

AI UNLOCKED
For new and existing customers for 3 months
CRON Job

CRON Job

What is a CRON job?

CRON jobs help you schedule and run certain tasks on your server. Cron jobs are used to automating tasks that run on the background periodically, e.g. in web applications like LiveAgent. Cron is a time-based task or job organizer in operating systems based on Unix (Mac OS, Linux, FreeBSD etc.). These scheduled jobs or tasks are referred to as Cron Jobs.

There are various circumstances when an online app may need certain tasks to run habitually. For example, sending emails in bulk or fetching data.

How CRON Jobs Work

CRON jobs operate on a schedule defined by a cron expression. The basic syntax of a CRON job is:

*/5 * * * * /usr/bin/php /www/virtual/username/cron.php > /dev/null 2>&1

This example runs a PHP script every 5 minutes. The five asterisks represent:

  • Minute (0-59)
  • Hour (0-23)
  • Day of month (1-31)
  • Month (1-12)
  • Day of week (0-7, where 0 and 7 are Sunday)

Common Uses of CRON Jobs

CRON jobs are incredibly versatile and can be used for many purposes:

Account Management

If you have a site where accounts have expiration dates, CRON can be programmed to automatically deactivate or delete account data when they expire.

Email Automation

One of the most common uses is the mass sending of daily emails. CRON jobs can automatically send newsletters, notifications, or reminders at scheduled times without manual intervention.

Website Maintenance

You can use CRON Jobs to check the content of your website. CRON Jobs can help you find broken links, validate content, or perform regular backups of your data.

Data Management

CRON jobs can fetch data from external sources, process information, or clean up old data from your database on a regular schedule.

Best Practices for CRON Jobs

When implementing CRON jobs, keep these best practices in mind:

  1. Monitor execution - Regularly check logs to ensure your CRON jobs are running successfully
  2. Set appropriate intervals - Don’t schedule tasks too frequently, as this can overload your server
  3. Use error handling - Implement proper error handling and logging in your scripts
  4. Test thoroughly - Test your CRON jobs in a development environment before deploying to production
  5. Document your jobs - Keep clear documentation of what each CRON job does and when it runs
  6. Secure your scripts - Ensure that CRON job scripts are secure and protected from unauthorized access

Conclusion

CRON jobs are a powerful tool for automating server tasks and improving the efficiency of your web applications. Whether you’re managing account expirations, sending bulk emails, or maintaining your website, CRON jobs can help streamline your operations. By understanding how to set up and manage CRON jobs in platforms like LiveAgent, you can automate critical processes and focus on growing your business.

Automate with scheduled tasks

Schedule automatic actions and workflows with LiveAgent's automation features. Save time with smart scheduling and recurring tasks.

Frequently asked questions

What are CRON jobs?

Cron Job is a command that is used to schedule jobs to be executed in the future. Most often it is used to schedule tasks to be performed periodically, such as notifications every Monday at 12.00.

What are CRON jobs used for?

CRON Jobs can be used if you have a site where accounts have expiration dates. The Cron can then be programmed to automatically deactivate or delete account data. Another functionality may be the mass sending of daily e-mails. You can also use CRON Jobs to check the content of your website. CRON Jobs then allows you to find broken links.

Can you set CRON jobs in LiveAgent?

CRON jobs can be set in LiveAgent. To do this, open the Cron Tasks desktop and click the 'Cron Task' button. Then set the cron run interval and copy the Cron Job URL. In the 'URL to connect' field enter: http://www.example.com/scripts/jobs.php. Next, select the frequency of cron jobs. After clicking 'Create Cron Job' everything is set up.

Learn more

Newsletter Email Templates
Newsletter Email Templates

Newsletter Email Templates

Discover the significance of newsletter email templates in digital marketing. Learn how they boost engagement, explore templates for various industries, and get...

6 min read
LiveAgent Email Marketing +1
Time rules features
Time rules features

Time rules features

Time rules in LiveAgent are time-based automation tools for tasks like help desk clean-up and email reminders. They enhance efficiency by automating repetitive ...

5 min read
Automation Ticket Management +1
Email Digest Templates
Email Digest Templates

Email Digest Templates

Explore customizable email digest templates by LiveAgent to share valuable content and updates. Improve customer engagement with personalized messages that buil...

5 min read
LiveAgent Email Templates +1

You will be in Good Hands!

Join our community of happy clients and provide excellent customer support with LiveAgent.

Post Affiliate Pro Dashboard - Campaign Manager Interface