You don’t need a plugin for this, a complete cron system is built into wordpress. If you don’t do anything, then wordpress is already running a lazy man’s cron job. Which means that it’s using your page hits to run the cron as close to your schedule as possible.
Or you can choose to disable the lazy man cron job and setup the wp-cron.php file to run every five minutes with a real cron job. Once that’s done, then you can do all of your scheduling within wordpress.
Get started here: http://codex.wordpress.org/Category:WP-Cron_Functions
register_activation_hook(__FILE__, 'my_activation');
add_action('my_hourly_event', 'do_this_hourly');
function my_activation() {
wp_schedule_event(time(), 'hourly', 'my_hourly_event');
}
function do_this_hourly() {
// do something every hour
}
Related Posts:
- Uncaught Error: Call to undefined function wp_generate_attachment_metadata() @ wp-cron
- Schedule WordPress Auto-Updates to only run during business hours
- What happens when wp_cron is deactivated in WordPress?
- Updating WooCommerce variable product stock issue
- wp_schedule_event / cron_schedules – custom recurrence time not working in Plugin
- wp_schedule_single_event function not working
- How ( and mostly at what time ) can i prevent the alternate cron from running?
- Why is wp-cron only executing on page visit?
- After plugin options changed hook
- Certain actions failing when run through cron
- Does using WP-cron make the site slower for the user?
- wp_schedule_single_event not working: cron job is triggered but nothing gets executed
- How does task scheduler plugin implements cron that is not dependent on page load request? [closed]
- How to set intervals in cron jobs?
- WordPress Console Application (ability to excecute a custom function via crontab only)
- Plugin scheduled event not working
- Switch from wp-cron to a server cron job
- What causes wp_schedule_single_event to fire off?
- How can i find the cron jobs that run on my site and then move them to the server side?
- WordPress cron job running more than once
- WP Import All Multiple Dynamic Link Imports
- Cron: Update four post at Hour
- Activate Plugin Automatically After Set Time
- Cron task gets removed from the schedule
- my hook or my function wont run in the cronjob
- Cron job shedules replace?
- WP_CRON issue with UTC and local time
- Run a Change Role Cron Job on WordPress via cPanel
- Better way to run heavy scripts using WordPress database
- Cron job emails blank
- WordPress Cron function is not working
- WordPress crob job performance
- Adding custom cron_schedule prior to wp_schedule_event
- How to set-up multiple cron task with wp_schedule_event so that they do not overlap?
- WordPress “wp cron event run” as Siteground cron job
- Cron Job not working
- Long running tasks in a plugin: wp-cron vs REST API callback [closed]
- Which approach for managing automatic updates would be more robust?
- ‘Global’ settings page for multisite plugin
- What Are Security Best Practices for WordPress Plugins and Themes? [closed]
- How do I show data from gravity forms in my template? [closed]
- Show a different number of posts per page depending on context (e.g., homepage, search, archive)
- How do I cleanly override a plugin’s CSS with a child theme?
- How can I add a featured image to a page?
- How to customize a plugin whilst maintaining ability to upgrade
- PHP code on Visual Composer Plugin
- How are plugins in the WordPress plugin directory ranked?
- How can I log a user out of WordPress before the page loads?
- What does a security risk in a plugin look like?
- How to generate/update a XML sitemap without plugins?
- How can I reduce the amount of files loaded/included per plugin?
- How to assign user a role if none is present when logging in
- How to make a list of companies’ information and display them to user, using custom post types and a custom taxonomy?
- How to create custom LOGIN and REGISTRATION forms?
- update_meta_user difference in i:1 and b:1, how to write b:1
- Registration Form Validation in wordpress
- Migrating a File from Plugin to Theme and changing its path → instead create a REST endpoint
- Access wordpress functions inside a plugin class
- How to add product images using script?
- resize only height using wp_get_image_editor
- View the source code of a 3rd party plugin? [closed]
- How do I make a wordpress plugin with menu item etc
- How to crop image from center using wp_image_editor
- Deactivate plugin upon deactivation of another plugin
- How to find out what blocks are added by a plugin
- Can’t access my WP dashboard: fatal error? [closed]
- allow arabic letters when register new account
- Use plugin or custom post type for game score functionality
- How can I see the error generated by plugin activation?
- How to add a random image to a post from gallery and only show one?
- How to implement Sentry on WordPress? [closed]
- Make specific products accessible only to a user role in WooCommerce
- Need Old Version of plugins
- Namespaces declared by a theme/plugin should start with the theme/plugin prefix. Found: “eustatos\test_plugin”
- Stuck on image in an Advanced Custom Field loop
- license check in plugin
- How to prevent users to download videos from lms website?
- With WordPress + Visual Composer, how to restrict a user to change some content in a page?
- How to append to title via functions.php for auto-posting plugin [duplicate]
- scrolltop always 0, can’t trigger script
- Translating long texts with html formatting
- Page Restriction and Redirect for Particular Levels or user
- How to bypass the Easy Digital Downloads checkout process?
- Assign post format to categories
- Add column to plugins table screen
- Map Custom Registration Fields to WordPress User Roles
- Making Mathjax dynamic so it renders input without page refresh
- Shrink down register_settings on Settings API
- custom payment gateway in woocommerce failed to connect to remote api server
- Parse error: syntax error, unexpected ‘new’ (T_NEW) in /misc/41/000/204/381/9/user/web/ragami.net/wp-settings.php on line 219
- add_shortcode is not working in plugin where others are working
- Front-end only $_POST and $_POST requests handling in WordPress plugin
- WordPress plugin/theme or other wayout to create portable pages?
- Ajax call returning 0
- How to create restrict content to users (by user, not by role)
- How to create user that has permission to create new sites on WordPress with multisite option enabled?
- How does WordPress know when there are plugin updates?
- Some code in shortcode function being ignored
- do_shortcode is outputting a string
- WordPress plugin admin html being shown in Customizer iframe