Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Scheduled task authentication


Reply


3 Posts   1873 Views

Avatar
nostradamus1935

Community Member, 9 Posts

24 June 2010 at 2:14am

Hello all.

I've set up a scheduled task that's run through a cron job with a command line of the form /usr/bin/php-cgi /home/myaccount/sapphire/cli-script.php DailyTask . When testing on my local server, it works, the job gets run. But on the distant server, it keeps asking me to log in.

Do you have any idea on how to make authentication unnecessary when calling stuff through the command line ?

Thanks !

Avatar
nostradamus1935

Community Member, 9 Posts

29 June 2010 at 3:46am

It seems you must not call cli-script.php but sake , that is : sh ....../sapphire/sake DailyTask . Easy. Figured it out this morning. Not sure if it depends on _ss_environnement.php being configured correctly but anyways, it works.

I answer my own question because it might help those who stumble across the dozen contradictory tips about this.

Avatar
jamie

Community Member, 4 Posts

21 February 2011 at 2:04pm

Just so that's a bit clearer, sake is a shell script so needs to be run with something like
httpd -c '/bin/sh ........site_dir......../sapphire/sake DailyTask'