What I'm trying to achieve is manage cron jobs by saving them into my database, then writing one generic job which runs every minute and triggers the jobs saved in the database.
I found this piece of code in a code igniter library which I saw here
$env = getenv('CI_ENV');
foreach ($query->result() as $row) {
$cmd = "export CI_ENV={$env} && {$row->command}";
$output = shell_exec($cmd);
//do other things
}
I do not understand what this line $cmd = "export CI_ENV={$env} && {$row->command}";
is really doing. I do not understand what export
is doing there.