-
almost retired
Short question about Linux and crontabs
I've written a java program, that pulls some html-site from a webserver, using the "TMP" environment variable. So the place of my "temp"-file should be $TMP/my-tmp.file. So when running this java program in crontab environment this TMP environment variable is "null", so my file gets nowhere and my program aborts. Sure I could use some other path, but how can I set this TMP variable within crontab environment?
Has somebody an idea? Thanks!
-
Cryptomaniac
Instead of calling your Java program directly, why don't you call a SH script which sets/reads any environment variables first and then calls your java program?
-
almost retired
Yeah, that would be the solution I could use.
Is the crontab environment (/etc/crontab) really without any environment except the $PATH?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules