wp_sms_pro_scheduled_interval
Customize the interval at which scheduled SMS cronjobs execute.
The wp_sms_pro_scheduled_interval filter allows you to modify the interval at which scheduled SMS cronjobs execute. By default, the system runs every 5 minutes.
Syntax
add_filter('wp_sms_pro_scheduled_interval', 'your_callback');
Parameters
| Parameter | Type | Description |
|---|---|---|
$interval | int | The interval in seconds |
Return Value
Must return an integer representing the interval in seconds.
Default Value
| Default | In Seconds |
|---|---|
| 5 minutes | 300 |
Examples
Set to 1 Minute
add_filter('wp_sms_pro_scheduled_interval', function($interval) {
return 1 * 60; // 1 minute = 60 seconds
});
Set to 2 Minutes
add_filter('wp_sms_pro_scheduled_interval', function($interval) {
return 2 * 60; // 2 minutes = 120 seconds
});
Set to 10 Minutes
add_filter('wp_sms_pro_scheduled_interval', function($interval) {
return 10 * 60; // 10 minutes = 600 seconds
});
Common Intervals
| Interval | Value (seconds) |
|---|---|
| 1 minute | 60 |
| 2 minutes | 120 |
| 5 minutes | 300 (default) |
| 10 minutes | 600 |
| 15 minutes | 900 |
| 30 minutes | 1800 |
Use Cases
- Increase frequency for time-sensitive SMS campaigns
- Reduce frequency to lower server load
- Adjust based on hosting environment limitations
Related
- OTP Rate Limiter - Limit OTP request frequency
Last updated: December 23, 2024