Results 1 to 3 of 3

Thread: Short question about Linux and crontabs

  1. #1
    almost retired the-mk's Avatar
    Join Date
    Jan 2003
    Location
    KI/OOE/Austria
    Posts
    1,921
    Blog Entries
    6

    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!
    the-mk

  2. #2
    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?

  3. #3
    almost retired the-mk's Avatar
    Join Date
    Jan 2003
    Location
    KI/OOE/Austria
    Posts
    1,921
    Blog Entries
    6
    Yeah, that would be the solution I could use.
    Is the crontab environment (/etc/crontab) really without any environment except the $PATH?
    the-mk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •