oracle259 Posted November 10, 2006 Share Posted November 10, 2006 Is there anyway to set up a cron job from within php itself. If so how? Link to comment https://forums.phpfreaks.com/topic/26852-php-and-cron-jobs/ Share on other sites More sharing options...
zq29 Posted November 10, 2006 Share Posted November 10, 2006 You could do it something like this:[code]<?php$h = fopen("path/to/my/cron/file/cron.txt","w");fwrite($h,"59 23 * * * /path/to/my/scripts/script.php\r\n");fclose($h);exec("crontab path/to/my/cron/file/cron.txt");?>[/code] Link to comment https://forums.phpfreaks.com/topic/26852-php-and-cron-jobs/#findComment-122794 Share on other sites More sharing options...
oracle259 Posted November 10, 2006 Author Share Posted November 10, 2006 Thanks. How do i modify or delete the cron job within php though Link to comment https://forums.phpfreaks.com/topic/26852-php-and-cron-jobs/#findComment-122799 Share on other sites More sharing options...
the_oliver Posted February 5, 2007 Share Posted February 5, 2007 I realise this is a little old, but im also intrested in it! Did you ever find a solution? Link to comment https://forums.phpfreaks.com/topic/26852-php-and-cron-jobs/#findComment-177678 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.