I’ve set up a simple cron schedule, which is runni...
# announcements
r
I’ve set up a simple cron schedule, which is running correctly. However, a solid in the pipeline calls
docker
, (through
subprocess.call()
) which seems not to be on the path when cron runs. I can manually fix this by adding
export PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin
to the
$DAGSTER_HOME/schedules/scripts/{}.sh
file, although this file is overwritten each time I call
dagster schedule up
. Is there a better approach/workaround for this?
I’ve got this working with something like the following (in the solid) instead of manually editing the bash script:
Copy code
my_env = os.environ.copy()
my_env['PATH'] = '/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin'
res = subprocess.check_call(['docker', <other_args>])
This doesn’t feel very elegant, so I’d still like a better approach, if anyone has any suggestions?
a
i cant think of a cleaner workaround 😕 - there is a new daemon based scheduler impl coming in
0.10.0
that should remove these cron related issues so keep an eye out for that
r
Cool - thanks - I can live with my workaround until then 😛