Home › AliExpress Dropshipping Forum › Other plugins › Gravity Forms Schedule Entries Export › Setup of additional time intervals and alternative file name
- This topic has 1 reply, 2 voices, and was last updated 1 year ago by
Admin.
- AuthorPosts
Nadia Kerr
ParticipantOctober 17, 2019 at 5:42 pm #8905Great plugin!!! We wanted our task to run every 25mins and have it overwrite the previous file. To achieve this we made the following changes to your plugin:
Added (where applicable in the index.php file):
array(
‘label’ => __(“25 minutes”, $this->_slug),
‘value’ => ‘minutes’
),case ‘minutes’:
//old logic only
$next_time = strtotime(“+25 minute”, $current_timestamp);
$local_time = GFCommon::get_local_timestamp($next_time);
break;case ‘minutes’:
$export_start = strtotime( ‘-24 minute’, $export_end );
$time_frame_text = ‘+25 minute’;
$time_frame_sec = 1500;
break;And update the filename prefix from:
$name_prefix = $feed_id . ‘-‘ . sanitize_title_with_dashes( $feed_data[‘meta’][‘export_feed_name’] ) . ‘-‘ . gmdate( ‘Y-m-d_g-i-s’, GFCommon::get_local_timestamp( time() ) ) . ‘_’;to: $name_prefix = ‘import_file’;
Perhaps these code snippets may help some others wanting to achieve the same thing.
Admin
Keymaster- AuthorPosts
- You must be logged in to reply to this topic.