Creating your own schedules is a little messy (because they need to be persistent and stored in database), but it is quite easy to hop on one of the native schedules that run twice a day.
add_action( 'wp_version_check', 'my_function' );
function my_function() {
//stuff
}
As for running actual queries you should use $wpdb
for that.
Related Posts:
- Export WordPress Posts and Meta Information in CSV format
- Delete posts from a post type automatically via Cron
- how to get permalink using sql
- Sql syntax error
- get posts and postmetas in assoc array
- Create cron job without a plugin?
- How do I find which articles are missing a featured image in The WordPress database?
- Bulk update post slugs through database
- Get the most repeated post contents from a search?
- Multiples Empty Posts were created and cannot delete them
- Delete WordPress posts from URL list sql query
- SQL query to retrieve all the records that have not indicated category
- How to verify wp user password by sql query in wp? [closed]
- Get ALL post ID’s export list (Only id’s. Php or sql not important )
- Avoiding “Missed Schedule” errors when inserting future posts
- WordPress website loads more posts than expected
- SQL Command for restoring trashed comments
- How to Assign / Move all Deleted post to a category
- Migrate posts from category and sub-category via SQL
- SQL Bulk Move old posts by one author to another category
- Export all posts to import as product items
- How can I get posts from 9/13/11 to today with SQL? [closed]
- Change published date and time using SQL query for page in every 5 hour
- SQL DELETE multiple post_meta on single and multi-sites
- Bulk find & replace on WordPress posts/pages (minus image paths)
- SQL query: select duplicate posts – but using duplicate meta [duplicate]
- WordPress MySQL Search and replace with wildcard?
- Using a meta_value or postdate to to query and orderby
- insert post fails after multiple postings
- Adding wordpress posts using phpmyadmin
- How to run select query of post with category and tags?
- Export Posts with specific custom fields by sql
- Query to get data of a post, if in category?
- Can’t create posts with WP DB Abstraction Plugin
- SQL query to remove first image in all posts
- Delete junk text from all the post using my sql command
- Special Query: Title, Terms, Content – %LIKE%
- If meta_key exists then don’t select this post?
- The page that displays Posts on homepage
- Change permalinks in posts via SQL
- Batch Scanning and Deleting Empty WordPress Posts
- How to disable content pagination?
- How to add/assign or change featured image in post programmatically?
- WP-CLI Bulk delete posts from specific category
- Update all posts automatically when using post_meta
- Moving WordPress to new server: no posts found
- Exclude ALL posts from sub categories
- Post ids are incrementing by an unknown number?
- Can’t show comments count per post outside loop
- Redirect based on user post count
- Should our pages be posts?
- Allow role to delete posts but block him the wp-admin
- Posting via email, where do I start troubleshooting?
- Creating a Post, can authors be ordered by last name?
- Get permalink of post that an attachment is linked to
- open selected wordpress post with javascript
- do_shortcode within post query
- How to change the setting so there is no post on home page
- How should I add links to other pages/posts from my post?
- problems with loading posts in a table-row
- How to have posts have a parent in permalink like site.com/blog/postname
- Unable to restore from backup – how to obtain old blog posts?
- Second comments section for one post/page
- Why Query is returning empty array?
- meta_value timestamp older than now
- Total number of posts in query (category/tag/author/search results/main page…)
- Very complex post query
- Change the number of excerpts displayed in search results layout
- Echo Text If User Is Logged in But NOT the Author of post
- Getting Whitescreen when publishing a post [closed]
- add div after image in post [closed]
- How do I link a Post Type to a Template in Masterplan?
- How can my plugin display a populated new post window
- Where is the “Posts”/”Blog” template?
- How to get posts ordered by using their categories?
- How to get value in radio input in post meta box?
- ACF date picker to trigger category change
- wordpress admin missing Posts button
- Set post title font size automatically according to number of words in post title
- post and page and custom post type
- How can I use query_posts to loop through posts and construct my own content?
- How to make an image appear as a thumbnail in the blog post?
- If I moved the location of my generic “posts” page, do I need to change the slugs for all of the individual posts?
- Not display post meta if empty
- post_name is not stored until post is published… where should I store my slug until it goes live then?
- Adding div to WordPress page content
- Why I have this strange behavior when I try to exlude the featured post from posts visualization?
- Super post cleaner, could this be category specific?
- How to organise post by category and date
- Show post if in category
- How to display custom content in post with category XXX
- Get current post’s child page?
- How to include Related Posts in WP RSS feed
- retrieve post slug by post_tags taxonomy
- Hide the contents for specific post
- Display post structure in function
- Filter/Sort Post Form On Taxonomy page
- sub posts to parent post
- Display post by select it from a dropdown menu
- I am using the query block and what I want and see on the editor page is not the same with the actual results