leo_maverick Posted December 10, 2008 Share Posted December 10, 2008 Hi, I am trying to call a Header Location using a condition in a starter file called while executing a cron job. But while executing the cron job the Header function does not seem to work though it works from the browser. Can some please help? Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/136322-any-susbstitute-for-header-location-using-cron-job/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 10, 2008 Share Posted December 10, 2008 The header() function sends a header to the browser to cause the browser to request the new URL. It is not a goto/call function on the web server. You would need to post your code to get any specific help with what it would take to make it work using a cron job. Quote Link to comment https://forums.phpfreaks.com/topic/136322-any-susbstitute-for-header-location-using-cron-job/#findComment-711279 Share on other sites More sharing options...
premiso Posted December 10, 2008 Share Posted December 10, 2008 How is the cronjob being ran? With PHP CLI? If so I doubt PHP CLI uses the header function. If on Linux you would probably need to use the LYNX browser in your cron job execution part for it to actually re-direct. Quote Link to comment https://forums.phpfreaks.com/topic/136322-any-susbstitute-for-header-location-using-cron-job/#findComment-711574 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.