# wp-to-buffer/3.8.3/includes/admin/cron.php

Social Media Auto Poster – Schedule &amp; Publish to Buffer, version 3.8.3. 20 lines.

- Page: https://pluginprobe.com/plugins/wp-to-buffer/3.8.3/code/includes/admin/cron.php
- Raw: https://pluginprobe.com/plugins/wp-to-buffer/3.8.3/raw/includes/admin/cron.php
- Modified: 2020-04-09T13:42:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-to-buffer/3.8.3/code/includes/admin/cron.php#L10-L20`.

```php
<?php
/**
 * Define the WP Cron function to perform the log cleanup
 *
 * @since   3.9.8
 */
function wp_to_buffer_log_cleanup_cron() {

    // Initialise Plugin
    $wp_to_buffer = WP_To_Buffer::get_instance();
    $wp_to_buffer->initialize();

    // Call CRON Log Cleanup function
    $wp_to_buffer->get_class( 'cron' )->log_cleanup();

    // Shutdown
    unset( $wp_to_buffer );

}
add_action( 'wp_to_buffer_log_cleanup_cron', 'wp_to_buffer_log_cleanup_cron' );
```
