I'm writing a rails app and need to run come scripts through ./script/runner
while i could put
#!/home/cannon/src/timetracker/script/runner
at the top, that wont work in production where it needs to be more like
#!/var/www/loclahost/htdocs/timetracker/script/runner -e=production
since ./script
is not in my path, and I don't want it to be, how can I allow this to be set up,
I am using a cron job to run it on a Linux box
Use env
in the shebang line to look things up in the path:
#!/usr/bin/env ./script/runner
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With