How to set up CRONJobs or scheduled tasks

How to set up CRONJobs or scheduled tasks

CRONJobs, or scheduled tasks, allow you to run scripts on your website as frequently as you decide. If you have a process that needs to run automatically at a certain frequency, you can set its periodicity by configuring a CRONJob.
 
1.-Starting the CRONJob configuration
To configure it, access the hosting management section, go to the "Server" section, and click the CRONJobs icon.
 
  
  • Email confirmation
If you want to receive the execution results every time a CRONJob runs, you must activate the following button:
 
 
You must keep in mind that you will only receive the email if the script returns a result. If the script you run does not return any result, you will not receive any email even if you have this option configured. 
 
2.-Configuration options
You can configure a CRONJob with the basic wizard or the advanced wizard.
 
  • Basic configuration
In the panel, you can see the "Create cronjob" section, where you access the basic CRONJob management that runs through a simple form.
 
 
  • CRONJob identifier: name that identifies the created CRONJob. It can have the same name as the CRONJob path.
  • Command to run: call to the script you want to run. It can be a simple execution or it can include parameters in the call (for example, /cron.php?time_ex=oadpASDk=). It can be changed so that it runs in http:// or https://
  • Time ranges: the period and frequency with which you want the script to run.
    • Minutes: you can configure a frequency such as every x minutes or at a specific minute, minute xx (of the 60 minutes in an hour).
    • Hours: you can configure a frequency such as every x hours or at a specific hour, hour xx (of the 24 hours in a day).
    • Days: you can configure the frequency as "Every day", select a day of the week, or on day xx (of the 31 possible days in a month).
    • Months: you can select "Every month" or one of the twelve months of the year. 
 
Once configured, you must click Save data to save the configuration.
 
  • Advanced mode
In the panel, you can see the "Create cronjob" section, where you access the basic CRONJob management that runs through a simple form. You must select the "Advanced configuration" option to access it:
 
 
  • CRONJob identifier: name that identifies the created CRONJob. It can have the same name as the CRONJob path.
  • Command to run: call to the script you want to run. It can be a simple execution or it can include parameters in the call (for example, /cron.php?time_ex=oadpASDk) It can be configured to run the file with http:// or https://
  • Time ranges: the period and frequency with which you want the script to run.
    • Minutes: you can configure a frequency such as every x minutes or at a specific minute, minute xx (of the 60 minutes in an hour).
    • Hours: you can configure a frequency such as every x hours or at a specific hour, hour xx (of the 24 hours in a day).
    • Days: you can configure the frequency as "Every day" or on day xx (of the 31 possible days in a month).
    • Months: you can select "Every month" or one of the twelve months of the year.
    • Day of the week: you can select a day of the week. 0 equals Sunday. 
 
Once configured, click Save data to save the configuration.
 
At the bottom of the panel, you will see the "List of cronjobs" section.
 
 
You can see the following data for each configured cronjob:
  • Identifier: name of the CRONJob.
  • Minute: selected execution frequency referring to minutes.
  • Hour: selected execution frequency referring to hours.
  • Day: selected execution frequency referring to the day.
  • Month: selected execution frequency referring to months.
  • Day of the week: selected execution frequency referring to the day of the week.
  • Edit: allows you to edit the inserted CRONJob.
  • Delete: removes the CRONJob from the system.
 

For more information, you can contact us.
    • Related Articles

    • How to set up White Label Panel (Management)

      Server domains In the accommodation ofcdmonyou have a white mark panel so that you can give access to another user and allow them to manage the hosting. The advantage of this dashboard is that the user you provide access will only be able to manage ...
    • How to set up hosting PHP

      Within the advanced tools of the hosting service, you will find the option Configure PHP, where you can modify different PHP directives to adjust your hosting to the requirements requested by some CMS applications. These values vary depending on the ...
    • How to set up a web redirection by URL

      To set up a URL web redirect from your Control Panel, you must have the domain, hosting, or both contracted with cdmon. There are three possible ways to create the URL redirect: through "Domain Management", through "Hosting Management", or through ...
    • How to set up permanent links in WordPress

      Permalinks are essential for any WordPress site, as they define the structure of your post and page URLs, helping them be optimized for search engines. In other words, permalinks are the web addresses that users will use to access that content. Here ...
    • How to set up the FTP user permanently in FileZilla

      To upload or update your website to the contracted hosting service, you must use an FTP client program. There are many programs that can help you, one of the most popular is FileZilla. Connecting to the FTP service through a manager requires a ...