Jump to:

23355 Posts in 17838 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Scheduled task authentication

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

Page: 1
Go to End
Author Topic: 1792 Views
  • nostradamus1935
    Avatar
    Community Member
    9 Posts

    Scheduled task authentication Link to this post

    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 !

  • nostradamus1935
    Avatar
    Community Member
    9 Posts

    Re: Scheduled task authentication Link to this post

    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.

  • jamie
    Avatar
    Community Member
    4 Posts

    Re: Scheduled task authentication Link to this post

    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'

    1792 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.