Only with cron: /usr/bin/env: ruby_executable_hooks: No such file or directory

后端 未结 3 837
粉色の甜心
粉色の甜心 2021-01-06 18:01

I have a perl script that uses system() to call a shell command, which uses ruby_executable_hooks.

When I run this script from the command line it executes flawlessl

3条回答
  •  离开以前
    2021-01-06 18:26

    I found the answer here: https://unix.stackexchange.com/questions/27289/how-can-i-run-a-cron-command-with-existing-environmental-variables

    Specifically, I just put ". $HOME/.profile;" in front of the cron command like so:

    0 5 * * * . $HOME/.profile; /path/to/command/to/run

    Thank you all for putting me on the right track.

提交回复
热议问题