Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail-safe output storage #11

Open
ElijahGM opened this issue Apr 19, 2016 · 1 comment
Open

Fail-safe output storage #11

ElijahGM opened this issue Apr 19, 2016 · 1 comment
Assignees

Comments

@ElijahGM
Copy link

ElijahGM commented Apr 19, 2016

Decouple Event::emailOutputTo from file system operations (such as file_get_contents in Event::emailOutput)

Original request

The cron seems to run ok, but the emailOutput not being sent upon troubleshooting i find the cron throws an error that the output log file does not exists, yet i have set the log file as follows

$schedule->call(function() {
echo "Wisdom at it caused\n";
echo date("G:i a")."\n";
})->cron('* * * * *')
->sendOutputTo('/var/www/html/test/schedules.log')
->emailOutputTo('[email protected]');

@kstkn
Copy link
Collaborator

kstkn commented Jul 13, 2016

In current implementation command being built with output directed to some filepath (/dev/null by default)

Like: /usr/local/bin/some-program > /your/output/path

I'm not sure if that's Scheduler responsibility to check if that path exists, but that approach seems not right.

@omnilight, symfony's Process has own methods to handle output. Maybe that way is more convenient.

I also personally think, that emailOutputTo should not depend on sendOutputTo.

@kstkn kstkn added the question label Jan 19, 2018
@kstkn kstkn added enhancement and removed question labels Nov 6, 2018
@kstkn kstkn self-assigned this Nov 6, 2018
@kstkn kstkn changed the title Email Not Being sent Fail-safe output storage Apr 9, 2019
@kstkn kstkn added this to the 1.1.3 milestone Apr 9, 2019
@kstkn kstkn removed this from the 1.1.3 milestone Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants