Debian :: Crontab Script Is Not Producing Any Output?
Jun 16, 2010
I have created a small script to compile a network weathermap using the cacti RRD files. The script reads the *.conf files and outputs an html and a png file. When I manually run the script it works normally.
I have edited my crontab with the crontab -e command to run this script every minute
The problem is script itself works when I manually call it but when it is run using crontab it doesn't do anything. The cron.log shows that the script IS being run every minute with no errors but the files (html and png) do not get written. What am I doing wrong and how do troubleshoot this?
View 1 Replies
ADVERTISEMENT
Sep 16, 2010
My Problem: The output redirection auf a script works if the script is called in the terminal but not when its called via crontab.
My Situation: I have 2 scripts:
~/backup1
Code:
echo backup a to c
rsync -a -v --progress --delete --exclude=.Trash-1000 /path/a/ /path/c/backup/
echo backup b to c
[Code]...
View 1 Replies
View Related
May 17, 2011
I write a little script that run top command and clear the output leaving only cpu ram and swap values. If i run the script manually everityng works fine but when i schedule the cript to run every 5 minutes from /etc/crontab all run fine but the output of the top command doesnt appear in the log :
This is the cript :
#!/bin/sh
echo "#############################" >> /var/log/performance.log
echo "" >> /var/log/performance.log
/bin/date >> /var/log/performance.log
[code]...
View 6 Replies
View Related
May 3, 2011
I have this code that is 'bashed' regularly with crontab and basically it will send me an E-Mail of most of the output but it misses out some of it!
Here is the crontab code to automatically run the script:
Code:
So that sends me an E-mail with most of the output of the following code:
Code:
It sends me everything up to echo "*******" "Begin compressing and transferring files" "*******" but it wont output the tar bit.. so it should give me a list of files that have been tarred.
View 1 Replies
View Related
Apr 27, 2010
I am using Linux 64 bit Redhat Linux. I am trying to setup simple crontab as follow...1. Edited crontab file using crontab -e2. Listed the file once to verify it using crontab -l. This will display as.. 18 5 * * 2-3 ksh $HOME/testScript.sh > $HOME/testscript.out3. Logged in a root and restarted cron deamon using "/etc/init.d/crond restart"As per my understanding now my testScript should start running at 5:18 am Thuesday
View 3 Replies
View Related
Jan 6, 2010
I'm new to mail via the CLI, so bear with me. I have this line in my crontab:
Code:
*/5 * * * * fetchmail
Which does check my mail every 5 minutes fine. But I get the command-line output mailed to
[code]...
View 3 Replies
View Related
Jun 23, 2011
is it possible disabling a crontab job without deleting the crontab description entry (by crontab -e)?I could also accept to change the entry itself. Now it's:0 0 * * 0-6 /home/me/cron/script.csh
View 4 Replies
View Related
Feb 3, 2010
I get heaps of errors from Okular saying that /tmp/kde-luke/* cannot be opened. I think it is doing this because I downloaded files from Firefox and opened them then closed firefox before closing the pdf files. I have tried uninstalling a purging Okular deleting the applications stuff in my home directory but it is still obsessed with these files. The only way I have been able to stop these annoying pop ups is by having the application uninstalled or running a starup script that will create these files on boot.
View 2 Replies
View Related
Mar 24, 2011
Just a heads up. I just found out about a free online book called Producing Open Source Software. It's great.
I just used a trunk checkout and the directions here to make myself an epub version:
[url]
EDIT AGAIN: don't download the epub version from here:
[url]
If you get it there, then the table of contents doesn't work. Make the epub version yourself, and you have a table of contents.
View 5 Replies
View Related
Aug 8, 2011
when I type "crontab -e" to edit the file, it is not opening in the editor & showing output as "285". I just wanted to edit crontab, So could anybody please tell me which is the real file of crontab, so I can manually edit that file using vi editor or nano. Or if that default editor is corrupted when I type "crontab -e", how can I change default editor before using "crontab -e" command. I will be waiting for your kind reply
View 2 Replies
View Related
Oct 6, 2010
I'm used to holding the left Alt and entering the ASCII character whenever I'm using an unknown keyboard configuration and want to type a special character. For example, Alt-092 makes a backslash (). That's on Windows. Is there a way to do this in Ubuntu ?
Note : I also want to be able to use this in console mode. That means I don't want a solution involving a software with a GUI.
View 3 Replies
View Related
Oct 19, 2010
I'm trying to get my head around compiling programs, and need some things clarified. Can anyone confirm or deny my understanding so far:
1) Program is written in high level language, such as C. File(s) of the program are the 'source code'.
2) Program is then 'compiled' to turn it into low-level code that is both hardware - i.e. Intel/AMD/ARM processor specific, and also Linux distribution specific. This resulting files are called the binaries.
3) I can go from source code to installed and usable program by doing these steps:
./configure
make
make install
View 6 Replies
View Related
Aug 6, 2010
No matter what I try I just cant get cron working for me on my Squeeze setup I can type /usr/bin/soffice and openoffice will fire up no problem but put into a crontab and nothing for instance just to test if crontab is working I have this/5 * * * * /usr/bin/sofficeIn y user crontab but nothing happens I have run as root crontab -u djt crontab And after editing the crontab with crontab -e it says it is installing crontab but it just does nothing Unfortunately I am connected to my works network so unable to receive internal mail from cron so cant find any reason for it not working
View 4 Replies
View Related
Aug 26, 2010
I have a question about using crontab with /etc/crontab...
I had a cron job that I needed to run as root. At the time I thought that sticking it in /etc/crontab would be a good idea. However, I used the crontab command to edit /etc/crontab, which I guess is not standard procedure? Specifically, I configured /etc/crontab as my local user's crontab (i.e. sudo crontab /etc/crontab) then added my cron job as I would a local user crontab (i.e. sudo crontab -e).
Originally, my cron job looked like this:
30 * * * * root /my/batch/script &> /dev/null
After adding the new cron job I started seeing errors. Something to the effect of "can't find command root" or something similar. So I removed the 'root' user definition from the cron job and the job started running fine. However, because this is /etc/crontab, there are other system related cron jobs that have been defined to run under the root account (e.g. "17 * * * * root cd / && run-parts --report /etc/cron.hourly" runs as root, etc.). So these pre-existing system cron jobs, which up until now have been running smoothly, are now generating "can't find command root" errors. But I think that the system cron jobs _are_ successfully being run someplace because logrotate seems to be working.
So what I _think_ is happening is that /etc/crontab is being run twice: once as the system crontab, and once as my sudoed local user's crontab. When I run crontab -l I see nothing, but when I run sudo crontab -l I can see the contents of /etc/crontab. I am reluctant to delete my sudoed local user's crontab, because then in the process I would be deleting the system crontab, and I do not know how I should restore the system crontab's contents. (I am still not sure as to the most appropriate way to edit the system crontab).
How can I get out of this mess? I want /etc/crontab to go back to the way it was before--running _once_ as the system crontab. As for my new cron job, I'm willing to reconfigure it anywhere so long as I am still able to run it as root. Any ideas? (I am using Ubuntu 8.04 Server LTE)
View 2 Replies
View Related
Apr 9, 2011
I have installed an application manager(monitoring application) on my linux server. Now, i need to have backup schedule for my application. The application itself has executive file to backup database.But when i put this file in my crontab to schedule the backup program it wont run!50 09 * * * root /opt/ME/AppManager9/bin/BackupMysqlDB.sh
View 1 Replies
View Related
Jun 20, 2015
In my office there is a department where the access of internet & intranet is very limited. I've been given a task that I should add a script which would automatically take screenshots of the PCs. The script works fine, but I can't make it work with the cron jobs. There are many methods given on the internet to grab screen, but none of them works with cron.
View 2 Replies
View Related
Jan 17, 2010
how to untar a file name /opt/Backup/abc.tar.gz2 periodically with crontab in debian. My Script name is abc.sh and i write it as
crontab -e
*/2 * * * * /bin/sh/ /opt/Bachup/abc.sh
while my abc.sh file is as under
#!/bin/sh
tar -xvf /opt/Backup/abc.tar.gz2
But it did not give any result. When i run it as sh abc.sh. it works succefully. but not in the crontab.
View 4 Replies
View Related
Oct 10, 2014
This python script works , but not from crontab.Here is my python script:
#more datetimedir.py
import os, datetime;
datestring = datetime.datetime.now().strftime("%Y%m%d_%H%M%S");
print (datestring);
os.mkdir(datestring);
Here is how I call it from crontab
*/30 * * * * /usr/bin/python3 /home/cwc/logs/datetimedir.py
View 2 Replies
View Related
May 1, 2010
I have a problem with Plymouth. It works pretty well on low res, but on higher resolution some strange video artefacts appear - see attachments.
I use ATI proprietary drivers, if it has something to do with it.
The resolution is set in /etc/default/grub like this:
Code:
GRUB_GFXMODE=1024x768
GRUB_GFXPAYLOAD_LINUX=1024x768x32
edit: reducing colour depth doesn't help /end edit
I don't know whether it has anything to do with the current problem, but Plymouth used not to appear at all until I followed these instructions (or actually I took them from another thread but I can't find it at the moment and these are the same).
I don't know whether it's possible to take them during booting so I've taken these photos with a mobile and retouched in gimp to remove reflections (more or less), and since I'm no pro photographer nor photoshop/gimp master they look as they look. They should do to demonstrate the problem, though.
View 5 Replies
View Related
Feb 2, 2011
I understand that block_device pointer *bd sholuld get initialized. Program should produce initialization error for *bd. Compiler is producing '->'. I am not understanding why?
[code]...
View 1 Replies
View Related
Aug 17, 2010
As I have developed a part of my project based on crontab and now one of my team member has raised a question based on performance and load/stress, I would like to know the following limits of crontab.I assume each line in crontab file is a task; and also crontab would hold completed and pending tasks.1. How many tasks (both completed and pending) could crontab hold/handle?2. Will crontab run as expected if there are 100s of completed and less than 100 pending task?
View 1 Replies
View Related
Feb 23, 2016
I got some crontab records and everything works fine. I installed mail server recently and all cron notifications started to come into my inbox. I'd like to receive only notifications about cron errors. I would rather not filter all notifications off.
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
View 1 Replies
View Related
Mar 3, 2011
I have been having trouble setting up a daily backup script with cron. It would basically never worked. Searched the net for answers but didn't find anything. I finally figured it out !! When root crontab is edited the execute flag is removed from #/var/spool/cron/crontabs/root. I change it with #chmod a+x /var/spool/cron/crontabs/root and all is good.
View 5 Replies
View Related
Jul 21, 2011
I was trying to write a crontab entry using "crontab -e"
Code:
0 0 * * * cp /var/log/httpd/domains/mydomain.net.log
/home/admin/logs/mydomain.net.log
crontab is giving me this error:
Code:
"/tmp/crontab.XXXXfMOnRS":2: bad minute
errors in crontab file, can't install.
I've tried a dozen different values for the minute, but it's still giving me the same error.
View 5 Replies
View Related
May 29, 2011
What is the difference between the crontab located in /etc/crontab and the crontab that can be edited using crontab -e?
View 2 Replies
View Related
Sep 30, 2010
I'd like to cut the 5th field of df command's output, but I'm not successful code...
I tried out every option I could think of... Not successful yet...
What I want, is to have the used space, like the 6% in this example, in the output, and nothing else.
View 6 Replies
View Related
Jul 6, 2011
I was just downloading a few torrent files when all of a sudden my network connection just died. I checked the output of dmesg an I saw this:
[25148.587960] [UFW BLOCK] IN=wlan0 OUT= MAC=00:26:c7:05:3f:c8:00:24:a5:34:93:91:08:00 SRC=192.168.106.1 DST=192.168.106.5 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=26519 DF PROTO=TCP SPT=4631 DPT=80 WINDOW=5840 RES=0x00 SYN URGP=0
[25174.135763] [UFW BLOCK] IN=wlan0 OUT= MAC=00:26:c7:05:3f:c8:00:24:a5:34:93:91:08:00 SRC=150.101.154.95 DST=192.168.106.5 LEN=58 TOS=0x00 PREC=0x00 TTL=114 ID=3696 PROTO=UDP SPT=18091 DPT=51413 LEN=38
[code]...
Of course their were hundreds of lines just like these,but just so you get the idea. I had to physically power down my router in order to get connected again, then all of this continued. I'm clueless in the networking department, but this seems alarming to me , as some of those source IP's are external. Is someone probing me? Or is this normal with torrent activity? I've never seen so much activity by my firewall. I recognize port 51413 is for transmission, but 3389? That's for remote desktop connections as far as I know.
View 4 Replies
View Related
May 29, 2015
Tried doing Code: Select allsystemctl lxc stop but it hangs with no output. I've tried letting it go overnight, no luck.
strace on the systemctl pid shows:
Code: Select allppoll([{fd=3, events=POLLIN}], 1, NULL, NULL, 8
Tried lxc-stop on my containers and it just hangs as well. apt-file shows no lxc-kill package available.
I just want to restart my containers. Debian 8.
View 3 Replies
View Related
Jul 14, 2010
I'm new to deian and linux in general. I have a project to build a web server. All is going well - have LAMP configured and now reading/learning about security. I've just done a netstat -tuan to look at what ports I have open. It gave me this. I've managed to find out what a mojrity of the ports are...some i'm not sure of. Just wondering if anyone could enlighten me by answering a few questions on my notes:
1. what are the ports with ???. Can i disable them?
2. how comes some ports are listed twice? Do i need to disable them more than once.
3. Are the notes i've made correct...can i remove the ones I'm thinking of removing?
[Code]...
View 8 Replies
View Related
Oct 30, 2010
If I have these lines...
How can I remove the (X) part from the end of all those? For example, when I cat the file which contains those, I just want to see those lines without the (X)...
View 4 Replies
View Related