CRON Job Files
Cron Jobs
Cron is a time-based job scheduler. A scheduled job is known as a cron job. Although typically used to automate system maintenance and administration it can be used to automate any task. Cron is most suitable for scheduling repetitive tasks. These are scripts that are set to run at selected times (day, week, month). The desired time and frequency is set using the site cPanel.
Because the 'jobs' are scheduled and run via the main cPanel the files are placed in the main file structure. Some of the primary Cron files are:
- Missing Images - Provides a list of all Memorial records that reference an image file but the file cannot be located in the images/cem_images directory. This should be scheduled to run weekly.
- Not Used Images - This is the reverse of Missing Images. This provides a list of all images in the images/cem_images directory that are not referenced in any Memorial record. This should be scheduled to run weekly.
- Missing GPS - Searches all images/cem_images directories for image files that contain GPS coordinates. For such records the memorial record is ??? This should be scheduled to run weekly.
- Missing Credits - Provides a list of all Memorial records that contain image references but do no include a reference to the person credited for providing the image. This should be scheduled to run weekly.
- Sitemap - Provides a series of .xml files used by bots that crawl websites to gather page results for SEO (Search Engine Optimization) statistics. The module uses the County_search.json file to produce the sitemap directory files. This is run on the first day of each month.
Cron Jobs that create a 'report' send an email to the County Coordinator. Additionally, the Admin area contains links to each report so Admin level users can generate a report as desired. These requests will display the report results in the user's browser.
Scheduled Run Time
Depending on the number of Memorial records, it may take several minutes for some of the Cron Job to finish. Thus, it is best to schedule the 'jobs' at a low traffic period. Early morning (1-2 a.m.) is a good window to schedule. Additionally, some time during the hour rather than just on the hour (e.g., 1:18 a.m.). Further, for a job scheduled once a week, Monday morning is a good time.
No Comments