General :: Cron Job For Testing First System But It Doesn't Work?
Oct 5, 2010
I created a very simple cron job for testing my first Linux system but It doesn't work. After open the crobtab file by typing crontab -e, I put a line like this to send email in every 2 minutes to report disk usage:MAILTO=dan@gmail.com*/2 * * * * du -s /homeI tried to restart cron several times but I still got nothing worked. /etc/init.d/crond restart
I have a simple cron job that runs every night & I tested this manually by just running the command as root in bash and all worked fine. It took some time but the crob job finished and I got my results emailed to me perfect / as expected.
Here is root's cron job listing:
Code:
Now I noticed that I never ever got anything emailed to me the following day so I am wondering if perhaps the Cron daemon doesn't have permissions or has an issue running / executing the command rather than when I test the command as 'root'? When I view my logs, I can see the command being executed and don't see any errors however I don't get email results when Cron runs the job rather than me taking the command and running it manually in Bash...then it works. What am I missing?
I want cron to act as an alarm clock: first, it plays an mp3 file and then it runs the speech synthesizer festival which tells me to get up and do stuff.
Now, mp3blaster doesn't do anything when I run it from cron, but festival works without problems.
I've found some possible causes for mp3blaster not working through cron. Someone suggested that pulseaudio is not started. This shouldn't be the problem for me, since I don't even have pulseaudio installed, and festival is playing sound without problems...
I don't know what I should do to make it work.
Here is my script - runalarm.sh:
Code:
I don't want to include the wakeup text here since it contains profanity.
The mp3 player could be another one too. mp3blaster happens to be the only player I know that is easy to run from console, like this "mp3blaster goodsong.mp3", without and playlist creation or other stuff like that.
I can run the runalarm.sh from SSH console and it works fine, the mp3 starts playing and festival speaks after that. When run from cron, festival starts speaking right away and no mp3 is heard.
I just got a new Dell monitor (U2715H), and even with beta Nvidia driver (355.06) on Debian testing x86_64, it doesn't detect highest resolution (2560x1440) when connected over HDMI to Nvidia Geforce GT 620. I have an HDMI 2.0 compliant cable, and according to Dell reps, the monitor should support 2560x1440 over HDMI.
Some suggested using xrandr to set the video mode explicitly. I tried doing it, and first got a EDID file with nvidia-settings, and run edid-decode. Where is what I got there:
Code: Select allDetailed mode: Clock 241.500 MHz, 597 mm x 336 mm 2560 2608 2640 2720 hborder 0 1440 1443 1448 1481 vborder 0 +hsync -vsync
So I used those values to make a new mode in xrandr:
Code: Select allX Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 18 (RRAddOutputMode) Serial number of failed request: 31 Current serial number in output stream: 32
I'm trying to start a script through crond. The record in crontab is: 30 16 * * * /home/alex/razhodilim.pl 1>/dev/null. The script razhodilim.pl works perfectly if I start it manually. But cron fails to start it. What could be the reason?
I would like to find a Linux testing environment , my PC is slow , it is not good to install VM and I do not have laptop , besides , I want to do testing at different places , can advise is there online Linux testing environment ? I just want to test the Linux command .
I have applied a patch in linux kernel version-2.6.31(fedora core 12)source code.Now I want to check whether the performance of the memory management part has been enhanced. So how to test the efficiency of this new modified code?
I have installed CPAN module Spreadsheet::WriteExcel, to generate some reports. Now when i execute my perl module from command line. it works fine and generates the excel file. When i put this module to be executed via cron, it doenst work and an email is generated. My entry in cron tab is as follows:2 14 * * * perl /scripts/postpaidRecon/postpaid.plThe email i receive in /var/spool/mail/root for module failure is:
I've created a custom Lucid installation using debootstrap, it works nice but have some problems, one of them is plymouth: it does not show the splash screen, when booting, I can only see a black screen, suddenly a green one and again black, when it is about to boot, some text messages appear and then the system starts. I'm only using X, no window manager, so I edited /etc/init/plymouth.conf and changed the start instruction from:
[code]...
But it remains the same, Plymouth does not show the splash screen.
I'm currently in distress because my Ubuntu system that has my university assignment doesn't work. Not only that, when I tried to fix it I managed corrupt the dual boot I had and now cannot login into either Windows 7 or Ubuntu (besides the USB tryout version which I'm currently on now.I'll try and describe what happened in the beginning. I was rushing to get to class so I needed to shut down my Ubuntu system quickly. The quickest way was to obviously hold down the off button however later when I got home to finish off my uni assignment I couldn't boot into linux! I just get a dos command line with the word grub on it.However not only did it not fix my problem I now can't boot into anything except from this Ubuntu Live CD.
I used the following 2 rules in iptables to forwarding some packagesiptables -t nat -A PREROUTING -p tcp --dport 8000 -j DNAT --to-destination 192.168.0.244:8000iptables -t nat -A POSTROUTING -p tcp --dport 8000 -j MASQUERADEIt works perfectly before, the kernel was 2.6.18-92.1.22.el5.After we did a update, the kernel now is 2.6.18-128.7.1.el5.and the forwarding is stop.I just wondering where can I get some debug information. I checked /var/log/message, dmesg ... seems nothing there.
This is my first linux related question so be kind!
One thing I find is my digital cardreader doesn't work well on Linux. I've wrote some code to fix this but when I try to click on visual studio nothing happens it won't install.
system-config-samba doean't work from terminal neither it is shown in graphical mode, i cannot see system > administration > servers. Server is missing.
When I was using polipo on Ubuntu, it automatically start at system boot. Now I'm using opensuse, I installed polipo from the repository, however, I have to manually start it by using "sudo polipo". If root privilege is not given, polipo won't work correctly. What should I do to make it start at boot automatically?
a friend told me to creat /etc/boot.local, with code...
I'm about to start a long research project and I think that being able to tag my files will make my life a lot easier. Basically, just as blogs tag posts with certain tags, I would like to tag documents with certain tags (ie. #secondary #2011 etc) and then search for documents by tag instead of trying to find them in folders.
Just noticed that my kids are no longer able to play webkinz on my 64bit system (Edubuntu). Webkinz also doesn't work on my 64bit Xubuntu system. Looks like 64bit Flash is broken? -- or something is broken between Webkinz and the latest flash. Webkinz, predictably enough, works on Windows, but also works on my 32bit Linux system with the latest flash.Just wondering if any of you out there with a 64bit system could try accessing Webkinz (if you can see the Login moniker and click it, then it's working on your system).
Is there something that blocks cron from running a shutdown command? I'm doing a daily bounce to break an attack (I have thread about that in security forum), but I always end up doing it manually. The cron log shows it being fired off at the right time...but the server never bounces. I thought maybe I just missed it, but there is nothing in messages that shows the server restarting (unlike when i do it manually, you see the start-up logging).
I recently was able to network 2 computers at home and I wanted to make my password more secure. When I try to edit my password via System>Administration>Users and Groups, it doesn't workI am able to edit my user settings. When I change my password I enter my old one and it accepts my new one. Problem is when I try to install programs, login and do other things it only accepts my old password. How can I change my password?
I tried to do Debian netinstall from minimum iso image in my brother's pc. My Network Interface card is Intel 82578DC GIGABYTE Network Connection. The installer gives a list of drivers to install but I don't know what to do. Should I download and install from first CD/DVD? Will it have appropriate drivers then?
After the latest update of network-manager-gnome to version 1.1.90-3 , I see that I have to start the nm-applet in Testing from a terminal, otherwise I can't bring up my wired connection.
The usual nmcli networking on command is failing to connect, also restarting the network-manager.service with systemctl doesn't do anything, the only way to connect at this time is indeed to manually start the nm-applet from a terminal.
I've also spotted this message in the logs:
Code: Select alltraps: nm-applet[1105] general protection ip error:0 in libgobject-2.0.so.0.4600.2
Could it be something wrong with my configuration (although , it worked before this update) or is it some bug in network-manager-gnome 1.1.90 ?
I've successfully installed Debian testing (squeeze) on my old iMac G3. I didn't select a desktop environment as a preconfigured package, but only left "standard system utilities" checked.Once I rebooted, I logged in as root (on the command line) and ran "apt-get install xfce4 xfce4-goodies gnome-icon-theme xdm", let all that pull in and installd then rebooted. As the system was booting, I could see all the services starting and whatnot, but when it gets to the line "Starting xdm..." the screen changes to black, but stays black for a good 2 minutes. I tried hitting some keys on the keyboard, as well as typingy login credentials, even though I can't see them, but nothing seems to work. I've tried rebooting several times
I am unable to run my cron tab job without root password.I made a little research on the forums and appearantly it should be changed.Must I change "passwd" part with my root password?
I set up some scripts n crontab and I found that the scripts are failing because cron seems not to load my user PATH variable. Is there any way to tell cron to load my PATH variable?