pdf2swf not working with crontab

142 Views Asked by At

I have a python program (queue.py) that convert PDF files to SWF files. It uses pdf2swf tool to achieve that. Now my problem is when I start this program manually by "python queue.py", it works fine. But the same program when I started using crontab.

Result shows

pdf2swf -o "/var/www/code_repository/younus/staff/../staffdocs/AIK/doc/248515566214636_IMPROVEMENT_IN_ELECTRIC_LIGHTS.swf" "/var/www/code_repository/younus/staff/../staffdocs/AIK/doc/248515566214636_IMPROVEMENT_IN_ELECTRIC_LIGHTS.pdf">/dev/zero

"sh: pdf2swf: not found"

Inside crontab -e

* * * * * python /home/francis/myjobs/queue.py

Any help will be greatly appreciated. Thank you.

1

There are 1 best solutions below

0
tripleee On

You need to have the binary in your PATH, or specify an explicit path name. You may also need to set up the Python library path etc to match the environment of your interactive shell.