darkfreaks Posted June 10, 2008 Author Share Posted June 10, 2008 in cpanel it wont let me run that shit! it makes me manually select how long i want to run it and just the path. :-\ Link to comment https://forums.phpfreaks.com/topic/109640-solved-cronjob-help/page/2/#findComment-562578 Share on other sites More sharing options...
DarkWater Posted June 10, 2008 Share Posted June 10, 2008 Okay, so manually select how long you want it for and just copy+paste the path from here to there...Without the /dev/null thing, because I don't think CPanel will even use it. Link to comment https://forums.phpfreaks.com/topic/109640-solved-cronjob-help/page/2/#findComment-562580 Share on other sites More sharing options...
darkfreaks Posted June 10, 2008 Author Share Posted June 10, 2008 i had it like that and it wouldnt update every 2 minutes Link to comment https://forums.phpfreaks.com/topic/109640-solved-cronjob-help/page/2/#findComment-562582 Share on other sites More sharing options...
trq Posted June 10, 2008 Share Posted June 10, 2008 Can you explain to us exactly what steps you have taken in detail. This thread is going knowehere fast. Do you even know what a cron is? Link to comment https://forums.phpfreaks.com/topic/109640-solved-cronjob-help/page/2/#findComment-562584 Share on other sites More sharing options...
darkfreaks Posted June 10, 2008 Author Share Posted June 10, 2008 to my knowledge a cron executes a php script. i was hoping to have it delete a query once a day every day but it seems it is not working even if i tell the cron to update once a day every day every month every year. Link to comment https://forums.phpfreaks.com/topic/109640-solved-cronjob-help/page/2/#findComment-562585 Share on other sites More sharing options...
DarkWater Posted June 10, 2008 Share Posted June 10, 2008 Cron is not only for PHP scripts. Who told you that? O_O And also, if you can't get that to work, you can do: wget URL/of/your/php/file --output-document='-' > /dev/null Link to comment https://forums.phpfreaks.com/topic/109640-solved-cronjob-help/page/2/#findComment-562587 Share on other sites More sharing options...
trq Posted June 10, 2008 Share Posted June 10, 2008 to my knowledge a cron executes a php script No, cron is a *nix program designed to schedule the execution of *nix commands (not just php) at a given interval. Cron itself doesn't actually execute the commands, but the specified interpreter does. It is likely you need to tell cron to execute your script using the php interpreter, otherwise it will attempt to use the default shell (usually bash). Link to comment https://forums.phpfreaks.com/topic/109640-solved-cronjob-help/page/2/#findComment-562589 Share on other sites More sharing options...
darkfreaks Posted June 10, 2008 Author Share Posted June 10, 2008 would this work??? /home/soutlnet/public_html/main/right.tpl>>/dev/null Link to comment https://forums.phpfreaks.com/topic/109640-solved-cronjob-help/page/2/#findComment-562594 Share on other sites More sharing options...
trq Posted June 10, 2008 Share Posted June 10, 2008 No. Nowhere in that line do you tell cron to use the php interpreter. I suggest you read the article posted about 10 replies ago. Link to comment https://forums.phpfreaks.com/topic/109640-solved-cronjob-help/page/2/#findComment-562596 Share on other sites More sharing options...
DarkWater Posted June 10, 2008 Share Posted June 10, 2008 would this work??? /home/soutlnet/public_html/main/right.tpl>>/dev/null 1) You aren't running it through PHP. Cron isn't directly involved with PHP at ALL. 2) Don't APPEND output to /dev/null, just redirect it. I mean, you probably can append it, but you should just use one >. Link to comment https://forums.phpfreaks.com/topic/109640-solved-cronjob-help/page/2/#findComment-562600 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.