Jump to:

23001 Posts in 11702 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » ScheduledTask errors

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: 344 Views
  • Room9
    Avatar
    Community Member
    19 Posts

    ScheduledTask errors Link to this post

    I've run a ScheduledTask successfully through the browser, but when running via cli I get errors:

    14:48:09 me@computer[webroot]$ ./sapphire/cli-script.php /ProcessOrdersDailyTask
    ./sapphire/cli-script.php: line 1: ?php: No such file or directory
    ./sapphire/cli-script.php: line 3: /Applications: is a directory
    ./sapphire/cli-script.php: line 4: assets: command not found
    ./sapphire/cli-script.php: line 5: assets: command not found
    ./sapphire/cli-script.php: line 6: assets: command not found
    ./sapphire/cli-script.php: line 7: assets: command not found
    ./sapphire/cli-script.php: line 8: assets: command not found
    ./sapphire/cli-script.php: line 9: assets: command not found
    ./sapphire/cli-script.php: line 10: assets/: is a directory
    ./sapphire/cli-script.php: line 12: /Applications: is a directory
    ./sapphire/cli-script.php: line 76: unexpected EOF while looking for matching `"'
    ./sapphire/cli-script.php: line 80: syntax error: unexpected end of file

    Same thing using the full path to cli-script.php.

    Any ideas what I'm missing?

    Thanks

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: ScheduledTask errors Link to this post

    CLI script is a PHP script so you will need to call it through 'php' first (php ./sapphire/cli-script.php). Or you can use sake, which is the CLI executable tool - http://doc.silverstripe.org/framework/en/topics/commandline

    344 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.