![]() |
![]() |
|
|||||||
| Register | Forum Rules | Getting Started! - Guide | Blog | Videos | Gallery | Members List | Social Groups | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
crontab question
I am having diffculty with running cron job on my Solaris 8 box.
We are currently using C_Shell on our Solaris UNIX system. Every time my schedule job is ran I get the following error message: /export/home/xia_j/call_checkSeller: sqsh: not found cron isnt reading the enviorment variables from .cshrc. How do I configure the crontab so that the above issue is resolved Thank You |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Re: crontab question
In article <1167769690.454384.165200@42g2000cwt.googlegroups. com>,
"YZXIA" <yzx27@hotmail.com> wrote: > I am having diffculty with running cron job on my Solaris 8 box. > > We are currently using C_Shell on our Solaris UNIX system. Every time > my schedule job is ran I get the following error message: > > /export/home/xia_j/call_checkSeller: sqsh: not found > > cron isnt reading the enviorment variables from .cshrc. How do I > configure the crontab so that the above issue is resolved > > Thank You The cron program usually uses just sh, not csh, so it doesn't see the ..cshrc. You can set the environment something like this in the crontab: (not tested) 29 * * * * ( myvar='this'; export myvar; /usr/local/bin/dowhat > /usr/local/log/dowhat.log 2>&1 ) Boyd |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Re: crontab question
boyd <tbmoore9@verizon.net> writes:
> In article <1167769690.454384.165200@42g2000cwt.googlegroups. com>, > "YZXIA" <yzx27@hotmail.com> wrote: > >> I am having diffculty with running cron job on my Solaris 8 box. >> >> We are currently using C_Shell on our Solaris UNIX system. Every time >> my schedule job is ran I get the following error message: >> >> /export/home/xia_j/call_checkSeller: sqsh: not found >> >> cron isnt reading the enviorment variables from .cshrc. How do I >> configure the crontab so that the above issue is resolved >> >> Thank You > > The cron program usually uses just sh, not csh, so it doesn't see the > .cshrc. You can set the environment something like this in the crontab: > (not tested) > > 29 * * * * ( myvar='this'; export myvar; /usr/local/bin/dowhat > > /usr/local/log/dowhat.log 2>&1 ) Easier: 29 * * * * myvar='this' /usr/local/bin/dowhat > /usr/local/log/dowhat.log 2>&1 If you really need all the settings from your .cshrc, you can do this: 29 * * * * csh -c "source .cshrc ; some_command" Or you can write a wrapper script that handles whatever settings you want and then invokes your target program, then just invoke the wrapper script from your crontab. -- Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst> We must do something. This is something. Therefore, we must do this. |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Re: crontab question
Keith Thompson wrote:
> boyd <tbmoore9@verizon.net> writes: >> In article <1167769690.454384.165200@42g2000cwt.googlegroups. com>, >> "YZXIA" <yzx27@hotmail.com> wrote: >> >>> I am having diffculty with running cron job on my Solaris 8 box. >>> >>> We are currently using C_Shell on our Solaris UNIX system. Every time >>> my schedule job is ran I get the following error message: >>> >>> /export/home/xia_j/call_checkSeller: sqsh: not found >>> >>> cron isnt reading the enviorment variables from .cshrc. How do I >>> configure the crontab so that the above issue is resolved >>> >>> Thank You >> The cron program usually uses just sh, not csh, so it doesn't see the >> .cshrc. You can set the environment something like this in the crontab: >> (not tested) >> >> 29 * * * * ( myvar='this'; export myvar; /usr/local/bin/dowhat > >> /usr/local/log/dowhat.log 2>&1 ) > > Easier: > > 29 * * * * myvar='this' /usr/local/bin/dowhat > /usr/local/log/dowhat.log 2>&1 > > If you really need all the settings from your .cshrc, you can do this: > > 29 * * * * csh -c "source .cshrc ; some_command" > will source it *twice*, because csh always sources .cshrc unless invoked with -f. To source it *once*, it must be csh -c "some_command" or csh -fc "source .cshrc ; some_command" -- Michael Tosch @ hp : com |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Re: crontab question
Michael Tosch <eedmit@NO.eed.SPAM.ericsson.PLS.se> writes:
> Keith Thompson wrote: [...] >> If you really need all the settings from your .cshrc, you can do >> this: >> 29 * * * * csh -c "source .cshrc ; some_command" >> > > will source it *twice*, because > csh always sources .cshrc unless invoked with -f. > To source it *once*, it must be > > csh -c "some_command" > or > csh -fc "source .cshrc ; some_command" Yes, thanks for the correction. -- Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst> We must do something. This is something. Therefore, we must do this. |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| crontab Qs | pemo | Unix | 2 | 15-09-2007 11:04 AM |
| Newbie-Email via crontab | Muffin | FreeBSD | 5 | 15-09-2007 10:55 AM |
| IE 7 question | n9ejs | Internet Explorer | 3 | 29-08-2007 03:00 AM |
| IE7 question | Willy | Internet Explorer | 4 | 29-08-2007 02:14 AM |
| question | john marsden | Windows XP | 4 | 27-08-2007 11:07 PM |
< Home - Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |