Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • A bit of an amateurish question - would this be inside my script which calls the engine_switch_check.txt? And how would I figure out the PATH variable? Commented Feb 17, 2015 at 4:57
  • @3kstc run echo $PATH from a normal terminal. You can place it inside the script or at the top of the crontab, before the cron entries begin. An example: unix.stackexchange.com/questions/158473/… Commented Feb 18, 2015 at 0:35
  • @muru - I'm unfamiliar with PATH. So I have a few Q's . I've run echo $PATH and I got this: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games. Q Where do I place this line, and do I call it. Is there anything else I need to write up within the crontab? Do I have to reconfigure my crontab's directory i.e. * * * * * /home/ed/enginecheck/engine.txt? Commented Feb 18, 2015 at 1:10
  • Place PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lo‌​cal/games at the top of of your crontab (the question I linked to in the previous comment has an example). As to the other question, first check out Sparhawk's comment on your question. Commented Feb 18, 2015 at 1:14
  • @muru I'm guessing it would be wise to also add SHELL=/bin/bash as all my codes in CronTab are written in BashScript (extensions are TXT though - this shouldn't be a problem right?) Q Once I place the PATH and SHELL on top of my crontab, what will I be doing :/ Sorry for such trivial questions, but I really want to learn. Commented Feb 18, 2015 at 1:26