Page Title: WordPress: Scheduled Tasks with WP-Cron – Josh Stauffer

  • This webpage makes use of the TITLE meta tag - this is good for search engine optimization.

Page Description:

  • This webpage DOES NOT make use of the DESCRIPTION meta tag - this is NOT GOOD for search engine optimization.

Page Keywords:

  • This webpage DOES NOT make use of the KEYWORDS meta tag - whilst search engines nowadays do not put too much emphasis on this meta tag including them in your website does no harm.

Page Text: February 27, 2021 WordPress: Scheduled Tasks with WP-Cron function js_cron_exec() { // Scheduled task code here } add_action( 'js_cron_hook', 'js_cron_exec' ); // Schedule the task if not already scheduled if ( ! wp_next_scheduled( 'js_cron_hook' ) ) { wp_schedule_event( time(), 'daily', 'js_cron_hook' ); } // Remove the scheduled task // $timestamp = wp_next_scheduled( 'js_cron_hook' ); // wp_unschedule_event( $timestamp, 'js_cron_hook' ); Few things to mention about the code: add_action() will create your hook. The first parameter of add_action() is the name of the hook you are creating. Name it as you please and use a name prefix. The scheduled event will call this. The second parameter of add_action() is the name of the function to call. Again, name it whatever. Use a name prefix. The hook will call this. wp_schedule_event() will schedule the event. The second parameter can accept: ‘hourly’, ‘twicedaily’, ‘daily’, ‘weekly’. WP-Cron is how WordPress handles scheduling time-based tasks in WordPress, such as checking for updates and publishing scheduled posts. With WP-Cron, all scheduled tasks are put into a queue. On each page load, it works by checking a list of scheduled tasks to see what needs to be run. Any tasks that need to be run are then executed. So while you can’t be 100% sure when your task will run, you can be 100% sure that it will run eventually. Put another way, if your task is scheduled to run at 2:00PM but your next page load is not until 5:00PM, the task with run at 5:00PM.

  • This webpage has 241 words which is NOT between the recommended minimum of 250 words and the recommended maximum of 2500 words.

Header tags:

  • It appears that you are using header tags - this is a GOOD thing!

Spelling errors:

  • This webpage has 1 words which may be misspelt.

Possibly mis-spelt word: WordPress

Suggestion: Word Press
Suggestion: Word-press
Suggestion: Wordless

Broken links:

  • This webpage has 9 broken links.

Broken image links:

  • This webpage has no broken image links that we can detect - GOOD WORK.

CSS over tables for layout?:

  • It appears that this page uses DIVs for layout this is a GOOD thing!

Last modified date:

  • We were unable to detect what date this page was last modified

Images that are being re-sized:

  • This webpage has no images that are being re-sized by the browser - GOOD WORK.

Images that are being re-sized:

  • This webpage has no images that are missing their width and height - GOOD WORK.

Mobile friendly:

  • After testing this webpage it appears to be mobile friendly - this is a GOOD thing!

Links with no anchor text:

  • This webpage has no links that are missing anchor text - GOOD WORK.

W3C Validation:

Print friendly?:

  • It appears that the webpage does NOT use CSS stylesheets to provide print functionality - this is a BAD thing.

GZIP Compression enabled?:

  • It appears that the serrver does NOT have GZIP Compression enabled - this is a NOT a good thing!