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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

ScheduledTask errors


Go to End


2 Posts   949 Views

Avatar
Room9

Community Member, 19 Posts

12 July 2012 at 2:51pm

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

Avatar
Willr

Forum Moderator, 5523 Posts

12 July 2012 at 5:34pm

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