-
Notifications
You must be signed in to change notification settings - Fork 30
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
Graph not working when run in script via cronjob ? #45
Comments
Hm, so when you execute the lua script manually it works, but executing the lua script from cron it does not? My first thought is a permissions issue. |
Yes, exactly it’s very strange I was thinking it could be something like permissions, but I have no idea how that works with cron ? Any ideas/suggestions? |
I found your SO post: https://stackoverflow.com/questions/66885493/lua-error-running-script-via-crontab-with-os-execute-command-exit-code-325 Did you try the suggested answer? Seems plausible to me that cron has a minimal |
Thanks - I had not noticed someone had responsed.. Using ‘whereis graph’, it returns the following.
Which suggests I would need to update the graph part of my Lua code to this, I’ll give it a go..
|
Well I tried the full path, and while it still works when I run it manually (as pi user) - it sadly still doesn’t work via crontab, although this time I now receive a 256 error/exit code, which at least suggests something has changed, Also rather than call it with os.execute(), I also tried it with io.popen , which is another option with Lua, but that gave me a very specific graph error - any ideas ?.
which ties back to this one (I think) - #39 |
Correct, that AttrbitueError is a python2 issue. I'll have a fix for it today |
|
Great many thanks - How best do I update my Pi with the latest version ? |
pip install graph-cli --upgrade Assuming you used |
Great many thanks - How can I find out which version of pip I used originally? |
You can see what was installed with pip using
That will also tell you the version installed. |
Great, ok, I’ve done that, and this is what it returned..
How do I work out the pip version ? |
That means it was installed with pip, so you can go ahead and do
|
Thanks - not sure if you can help with this, but for some reason every attempt I’ve made to do the upgrade it fails on my raspberry pi - it gets part way through, but then I’m exited out of the terminal and it returns the following.
|
Sounds like a network issue.. I can't help you there 😕 |
I’ve google’d the hell out of this and no luck fixing it. - so I’m going to try and do a whole new Rasp Pi build and install graph_cli from scratch. |
Wow, I forgot how long it takes to install :-) This part took ages, why is that ?
|
Hi, quick update, the Installation claimed to have been successful, but I now receive a new error whenever I run graph.. I’ve posted it as a new issue.. #47 |
|
Hi
I have a Lua script that I’m trying to run via crontab below.
The whole script does a lot of different things, but here’s the specific os.execute graph request below.
When I run it manually at the command line it works fine - see output below.
but when I check the logs after running it via a cronjob, it fails and reports the following
Any idea of the cause and required fix ?
The text was updated successfully, but these errors were encountered: