[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] csh scripts afviklet af bruger på kommandolinie kontra afvikling crontab i Linux



Poul Kristensen wrote:
7Hej !

Jeg er løbey ind i et - for mig - højste besynderligt problem.

mine csh scripts kan ikke finde aliaser + source variable, når de afvikles
i  crontab.

Det går fint fra brugerens kommandolinie.

Ex,

./somescript.csh

Fra brugerens crontab
/bin/csh -c " source /sti/til/environment/environment_variable;
/sti/til/somescript.csh "
Ovennævnte linie kan ikke finde environment i Linux??
Køres samme linie direkte fra brugers kommandolinie går det derudaf.

Har nogen et hint til hvorfor?
Jeg har naturligvis "googlet".
Crontab kan ikke "se" environment variable;
de skal sættes i crontab scriptet.

Hvis du f.eks. googler sådan
"linux environment variables in crontab job"
 er første hit dette:
http://www.unix.com/sun-solaris/31898-setting-environment-variables-within-cron-jobs.html
Citat:
You need to create a script that sets the variable and runs your program, like:
* * * * * /usr/local/bin/myscript

cat myscript

export LD_LIBRARY_PATH=/your/library/path
/usr/local/bin/myCprogram



--
Med venlig hilsen

Jørgen Heesche
mailto:sslug@sslug


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2010-02-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *