On 27 February 2011 21:48, balaji sivanath <[email protected]> wrote: > Hi, > I am just learning to schedule jobs using crontab. I have following doubts > > 1) When using the following line in crontab file > 28 * * * * ls > /home/balaji/testlog > In testlog file list of files got written > > now, > 30 * * * * wget www.1.com > /home/balaji/testlog > I need to get an error in that log file but nothing got write in the log.
Please read about unix/linux in general. It seems you lack in understanding of file descriptor. No output will be in that file. Because error or not send to > but to 2> So replace > with 2> or better to log both error and output you can redirect standard error and standard output but redirecting error or output to the other. Like this 30 * * ** wget www.1.com 2> /tmp/1.txt 1>&2 > 2)Another thing, I started the crontab file with MAILTO="[email protected]" > but no mail came to that address. That is not the way to send mail . It works only on GUI when some one clicks on link their default mail client will be used to open the GUI. How can a crontab do that when it is working in the background. Please read on the mail command . It will tell you how to send mail through command line. > 3)Using Crontab can we open any gui based application? I tried this > "32 * * * * gedit" but didnt work > Crontab works in background . So i doubt it will ever work. > Search engine didnt provide a site with full details, so send any good > site or book detail regarding this. > > Regards, > Balaji > _______________________________________________ > ILUGC Mailing List: > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc > _______________________________________________ ILUGC Mailing List: http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
