Replies: 1 comment 1 reply
-
Hey Greg, I run mnamer on using a cron myself so it should be able to work. If I had to guess the problem might be an environment or permission issue. Crons can run under a different user account and often don't have the same PATH or other environment variables. As a result it may not be able to find or have access to the mnamer package, its dependencies, or its user configs. If this is the case the easier way is probably installing mnamer using pipx. pipx is a nice little tool that installs packages and their dependencies in its own private virtualenv separate from your other packages using a nice lightweight wrapper, and makes updating easier too.
Using this method on linux, my crontab line looks like this: Otherwise you might need to write your own wrapper script and use that, e.g.: import re
import sys
sys.path.append("abspath where mnamer is installed")
from mnamer.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main()) In the future please include crash reports when reporting issues related to crashes. It makes troubleshooting much easier. In this case including your crontab line would probably be helpful as well. |
Beta Was this translation helpful? Give feedback.
-
Hi, I noticed that while using mnamer manually it works perfectly, but using it automatically (like cron, or an event based script) it crashes and fails. I'm using the same command on both situations, but only works while manually
Has anyone else experienced this issue? Is there any fix or workaround?
Beta Was this translation helpful? Give feedback.
All reactions