LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   crontab jobs aren't running (https://www.linuxquestions.org/questions/linux-general-1/crontab-jobs-arent-running-328518/)

mdm_linux 05-30-2005 08:59 AM

crontab jobs aren't running
 
hello,

i'm having trouble getting cron to work; none of the jobs seem to run. cron is running background after bootup. platform is Debian, which as far as i can tell isn't too different from cron on other distros.

3 entries
Code:

mm@al:~$ crontab -l
37 4 * * * date +%y%m%d
3,13,23,33,43,53 * * * * wget -O "/home/mm/data/`date +%r`"\ radar.gif http://www.meteoschweiz.ch/data/radsat/radar.gif >/dev/null 2>&1
* * * * * xcalc


a debugging attempt:

Code:

strace -f -p 1397 -o /tmp/asdfj

al:/home/mm# cat /tmp/asdfj  | grep -i xcalc
2145  execve("/bin/sh", ["/bin/sh", "-c", "xcalc"], [/* 4 vars */]) = 0
2145  stat64("/usr/bin/xcalc", 0xbffffb00) = -1 ENOENT (No such file or directory)
2145  stat64("/bin/xcalc", 0xbffffb00)  = -1 ENOENT (No such file or directory)
2145  write(2, "/bin/sh: xcalc: command not foun"..., 34 <unfinished ...>
2144  <... read resumed> "/bin/sh: xcalc: command not foun"..., 4096) = 34

any pointers?

spaniel 05-30-2005 09:16 AM

PATH Setting
 
Hi,

When running under cron the profile and .bash_profile are not run.
Try calling file executables with the full path name (fully qualified name)

mdm_linux 05-30-2005 09:58 AM

ah, that's good to know.

i updated crontab accordingly; here's the new trace output

Code:

al:/home/mm# cat /tmp/asdfj  | grep -i xcalc
2679  execve("/bin/sh", ["/bin/sh", "-c", "/usr/bin/X11/xcalc"], [/* 4 vars */]) = 0
2679  execve("/usr/bin/X11/xcalc", ["/usr/bin/X11/xcalc"], [/* 7 vars */]) = 0


those errors are gone,
but i don't see any xcalc apps run

mdm_linux 05-30-2005 11:24 AM

syslog
 
so syslog says xcalc is being run

but shouldn't i see it?


al:/home/mm# cat /var/log/syslog | grep -i xcalc
May 30 12:04:01 al /USR/SBIN/CRON[3145]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:05:01 al /USR/SBIN/CRON[3150]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:06:01 al /USR/SBIN/CRON[3163]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:07:01 al /USR/SBIN/CRON[3174]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:08:01 al /USR/SBIN/CRON[3212]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:09:01 al /USR/SBIN/CRON[3265]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:10:01 al /USR/SBIN/CRON[3300]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:11:01 al /USR/SBIN/CRON[3305]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:12:01 al /USR/SBIN/CRON[3334]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:13:01 al /USR/SBIN/CRON[3343]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:14:01 al /USR/SBIN/CRON[3356]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:15:01 al /USR/SBIN/CRON[3364]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:16:01 al /USR/SBIN/CRON[3369]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:17:01 al /USR/SBIN/CRON[3394]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:18:01 al /USR/SBIN/CRON[3404]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:19:01 al /USR/SBIN/CRON[3419]: (mm) CMD (/usr/bin/X11/xcalc)
May 30 12:20:01 al /USR/SBIN/CRON[3426]: (mm) CMD (/usr/bin/X11/xcalc)

mdm_linux 05-30-2005 12:27 PM

i figgered it out all by myself

DISPLAY doesn't get set either


All times are GMT -5. The time now is 08:24 PM.