Dragen Posted June 27, 2007 Share Posted June 27, 2007 hi, I'm using a cron job to automate a script on my server.. The cron job however is on another server. I'm not sure if this is possible, but I keep getting an error. /bin/sh: http://www.mydomain.co.uk/mydirectory/daycom.php: No such file or directory For some reason it seems to be adding : at the end of the link. I can't figure out why as I don't have the : on the url for the file. Anyone know why? Thanks Link to comment https://forums.phpfreaks.com/topic/57408-cron-job-help/ Share on other sites More sharing options...
trq Posted June 27, 2007 Share Posted June 27, 2007 You can't simply pass a url to /bin/sh and expect the shell to do something with it. You dont want to use /bin/sh at all. You'll neeed to use wget or something simular. eg; Your cron might look like. * * * 1 * /usr/bin/wget http://www.mydomain.co.uk/mydirectory/daycom.php Link to comment https://forums.phpfreaks.com/topic/57408-cron-job-help/#findComment-284001 Share on other sites More sharing options...
Dragen Posted June 27, 2007 Author Share Posted June 27, 2007 Thanks, I don't think I can change the /bin/sh part. The only option I have is the time and url.. The /bin/sh bit seems to be automatic :-\ Link to comment https://forums.phpfreaks.com/topic/57408-cron-job-help/#findComment-284032 Share on other sites More sharing options...
trq Posted June 27, 2007 Share Posted June 27, 2007 Are you setting up this cron through some sort of control panel? Otherwise, post your cron job. If you are, then the problem may indeed be that you dont have url wrappers enabled and are not able to execute remote scripts via cron. Either way. /bin/sh cannot execute php. Link to comment https://forums.phpfreaks.com/topic/57408-cron-job-help/#findComment-284038 Share on other sites More sharing options...
Dragen Posted June 27, 2007 Author Share Posted June 27, 2007 yeah, it's through a control panel. How can I do it otherwise? Link to comment https://forums.phpfreaks.com/topic/57408-cron-job-help/#findComment-284040 Share on other sites More sharing options...
trq Posted June 27, 2007 Share Posted June 27, 2007 How can I do it otherwise? You need shell access. Link to comment https://forums.phpfreaks.com/topic/57408-cron-job-help/#findComment-284042 Share on other sites More sharing options...
Dragen Posted June 27, 2007 Author Share Posted June 27, 2007 Okay. I've got shell acces, but I'm not sure how to use it.. I've got an option of selecting a key type, when I go to generate an ssh key. The options are DSA or RSA Not sure what I'm on about here... Link to comment https://forums.phpfreaks.com/topic/57408-cron-job-help/#findComment-284079 Share on other sites More sharing options...
Dragen Posted June 30, 2007 Author Share Posted June 30, 2007 anyone? Link to comment https://forums.phpfreaks.com/topic/57408-cron-job-help/#findComment-286853 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.