$mints = (int)date('i', strtotime($txtschedual));
$uniqueid = uniqid();
$cronFile = getcwd()."/schedule/thecommand".$this->sessionAdmin->user_id."".$this->sessionAdmin->username.$uniqueid.".sh";
$fh = fopen($cronFile, 'w') ;
chmod($cronFile,0777);
$stringData = "wget -O -q -t 1 ".BASE_URL."file.php?from=".strtotime($_POST['schedual'])."";
fwrite($fh, $stringData);
fclose($fh);
$crontab = new Ssh2_crontab_manager(SSH2_HOST, SSH2_PORT, SSH2_USERNAME, SSH2_PASSWORD);
$cronDatetime = $mints.' '.$hrs.' * * * '.$cronFile;
$crontab->append_cronjob($cronDatetime);
But I'm not understand about the code to connect cron file.How can I connect cronfile from fuelphp?
It looks like you're new here. If you want to get involved, click one of these buttons!