Skip to content
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

Specify shell or allow setting all jobs to automatically source a file/profile? #328

Open
MostHated opened this issue Mar 18, 2021 · 1 comment

Comments

@MostHated
Copy link

Hey there,
I seem to be having a bit of an issue finding a reliable way to access environmental variables and functions from jobs. I see that the jobs return back $SHELL as /bin/sh. Is there some way I can make all jobs run under a different shell (such as zsh) so that it can automatically pick up my .zshenv file or if not that, at least pick up the /etc/bash.bashrc or something along those lines, straight from the cmd line within the job file so that I don't have to make each job individually source it?

Thanks,
-MH

@MostHated
Copy link
Author

MostHated commented Mar 19, 2021

I just thought of this, so I wanted to post it while I was thinking of it. Being able to have settings such as the ones below would be awesome.

prefs:
  shell: /bin/zsh # Set default shell for all jobs
  source: $HOME/.jobberenv # Default source file for all jobs

jobs:
  myjob1:
     cmd: $HOME/scripts/job1.zsh
     source: $HOME/.job1env # Source for specific job in addition to the default source
     time: '*/30 * * * * *'  
     onError: Continue 
  myjob2:
     cmd: $HOME/scripts/job2.xsh
     shell: /usr/bin/env xonsh # Shell for this job, overriding default shell above
     source: $HOME/.job2env # Source for specific job in addition to the default source
     time: '*/30 * * * * *'  
     onError: Continue 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant