Məlumat bazası

How to create Cronjob via cPanel?  Məqaləni çap et

Overview:

Cron jobs are scheduled tasks that the system runs at predefined times or intervals. Typically, a cron job contains a series of simple tasks that the system runs from a script file.

Important:
  • Exercise caution when you schedule cron jobs. We recommend that you allow enough time between cron jobs for the previous cron job to complete. If you schedule them to run too often, the server could start another cron job before the last cron job ends. This duplication may degrade performance.

  • For more information about cron jobs, read Red Hat’s Scheduling a Cron Job documentation.

Add a cron job

To create a cron job, perform the following steps:

  1. Select the interval at which you wish to run the cron job from the appropriate menus, or enter the values in the text boxes.

    • Common Settings — Select a commonly-used interval. The system will configure the appropriate settings in the MinuteHourDayMonth, and Weekday text boxes for you.

    • Minute — The number of minutes between each time the cron job runs, or the minute of each hour on which you wish to run the cron job.

    • Hour — The number of hours between each time the cron job runs, or the hour of each day on which you wish to run the cron job.

    • Day — The number of days between each time the cron job runs, or the day of the month on which you wish to run the cron job.

    • Month — The number of months between each time the cron job runs, or the month of the year in which you wish to run the cron job.

    • Weekday — The days of the week on which you wish to run the cron job.

  2. In the Command text box, enter the command that you wish the system to run.

    Important:
    • You must specify settings for the MinuteHourDayMonthWeekday, and Command text boxes.

    • Exercise extreme caution when you use the rm command in a cron job. If you do not declare the correct options, you may delete your home directory’s data.

    • If your cron job runs a custom script, the script requires the execute permission. For more information, read Red Hat’s Linux Permissions documentation.

    Note:

    Specify the absolute path to the command that you wish to run. For example, if you wish to run the public_html/index.php file in your home directory, enter the following command:

    /home/user/public_html/index.php

     

     

  3. Click Add New Cron Job.

Bu cavab sizə kömək etdi?

Uyğun məqalələr

How to Edit file in the cPanel File Manager?
1. Log into your cPanel account.2. In the "Files" section, click on "File Manger" Icon. 3....
How to create a new folder or files in the cPanel File Manager?
1. Log into your cPanel account.2. In the "Files" section, click on the "File Manger"...
How to check disk usage of directory and bandwidth usage?
If you are receiving a disk space usage warning and don't know which folder is using too...
How to upload files via the cPanel FileManager?
If you don't want to use a 3rd party FTP Software, you can use the cPanel's inbuilt...
How to Edit .htaccess File via the cPanel Filemanager?
1. Log into your cPanel account. 2. In the "Files" section, click on "File Manger" Icon. 3....