Add (serp ai gen)
Add (scheduler)
This commit is contained in:
@@ -11,3 +11,23 @@ function get_slack_channel_by_env($slack_channel = 'slack')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('get_exponential_posts_gen_by_day')) {
|
||||
|
||||
// Function to calculate the value for a given day
|
||||
function get_exponential_posts_gen_by_day($day, $period_days = 45)
|
||||
{
|
||||
|
||||
$min_value = 4;
|
||||
$max_value = 150;
|
||||
|
||||
$growthRate = log($max_value / $min_value) / $period_days; // Calculate the growth rate
|
||||
$value = round($min_value * exp($growthRate * $day));
|
||||
|
||||
if ($value > $max_value) {
|
||||
return $max_value;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user