Drupal 7 is now commonly trusted by webmasters longing for more powerful features and a higher level of usability & security than the previous versions. Since you have Drupal 7 installed on your site, it allows a rough setting for cron timings in a simple manner. If you wish to have a thorough configuration for con job, follow this guide on how to configure Drupal 7 cron manually.
Cron job is just like a reminder of tasks for Drupal core and Drupal modules. You can schedule when to take place a task as well as index website content by configuring cron job. Here, we would like to focus on setting the frequency of Drupal 7 cron and the way to run it manually.
Configure & Run Drupal 7 Cron via Admin Panel
Since you are required to have all steps completed via Drupal dashboard, log into your Drupal admin panel with personal user login information.
Move to the top of your admin panel and target Configuration. Here come several modes for multiple purposes, including People, System, Content Authoring, and so on. Focus on System mode and click “Cron” to set about managing automatic site maintenance tasks.
The Cron interface is where to run cron and set the interval of each task. By default, cron runs every 3 hours and that can be modified as you need. Expand the drop-down list under “Run cron every” which enables several options for running cron job, including Never, 1 hours, 1 day, and so on. Select one according to personal needs and click “Save Configuration” to confirm all changes.
Above the “Run cron every” mode, this is where to run your cron job manually if there is a need to check updates or index certain content on your site. That is easy to handle even for beginners and what you need to do it clicking the “Run cron” button.
In addition, you can run cron manually via Home > Administration > Reports > Status report. Target “Cron maintenance tasks” and click to run con manually. The notice “Cron ran successfully” indicates that you have completed this job.
Configure Drupal 7 Cron Using Command
The cron command is like the following example and the URL http://www.example.com/cron.php should be replaced to your own website cron. That means the cron job runs on the top of the hours. Perhaps, you can modify the figures to adjust how often to run a cron job.
0 * * * * wget -O - -q -t 1 http://www.example.com/cron.php
You can check the cron job for your website via a special URL like https://yourwebstie.com/Drupal/cron.php?cron_key=7_C0bfxvfXizM16ZOaZyCWAaPmYpEIz ML and that can be found through Home > Administration > Configuration > System. The URL is under the “Run cron” button. Besides, it is also shown under Home > Adminitration > Reports > Status report > Cron maintenance tasks.
Here is an example of the crontab syntax, which looks much more complicated that the previous sample and indicates that the cron job runs every hour of a day. That further lasts a week.
To be honest, setting frequency of every cron job via Drupal admin panel is much easier and more understandable, especially suitable for beginners. However, if you desire for more flexibility, then going with cron command is a great option for you.