Add (serp ai gen)

Add (scheduler)
This commit is contained in:
2023-09-26 01:47:14 +08:00
parent e63231b65e
commit c27ec696d1
17 changed files with 1474 additions and 51 deletions

View File

@@ -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;
}
}