I have a command line app in which I need to implement some kind of scheduler to run a script once after execution of the first script.
Now, I'm trying to run a script a minute after execution time, with this directive:
$dir = getcwd().'/';
exec('echo '.$dir.'./prices get:inventorylist '.database_connector::getUserId().' '.database_connector::getLand().' --reportId="'.$this->reportRequestId.'" | /usr/bin/at now + 1 min');
When trying to run this without echo
and | /usr/bin/at now + 1 min
it's running perfectly fine without throwing any errors, I've also checked if at
is working, and it should be fine.
Well, actually, the script is getting executed after the given additional time, but I keep getting this error in syslog:
Jan 23 19:09:01 atd[6792]: Exec failed for mail command: No such file or directory.
I can't understand this error, as, as I mentioned above, the script is running and the directive is running without any problems or errors when I run it without at.
Is there something I don't see why this error could be possibly thrown?