General :: Log The Start/completion - Time&date - Of My Cron Job Script?

Jan 11, 2010

How do i log the start/completion (time&date) of my cron job script? i want to be able to see what time it started and what time it finished? and if there where any errors while running my script.

View 3 Replies


General :: Send Email About Status Of Cron Job Completion

Jun 29, 2011

I have some scripts that do usual stuff like backing up MySql database, gz, tar some files and put them on FTP or sync with some other backup/mirror system. Some scripts are running quite frequently (like twice/thrice per hour). I am sending email with attached log output from commands after completion of job. It is quite a lot of email to keep track of.I want to send email only when script fails to do something, that is when some command in script fails. How can I accomplish this?

View 2 Replies View Related

General :: Make Zsh Completion Behave Like Bash Completion?

Jun 2, 2010

I switched to zsh, but I dislike the completion. If I have 20 files, each with a shared prefix, on pressing tab, zsh will fully complete the first file, then continue going through the list with each press of tab. If I want one near the end, I would have to press tab many times.

In bash, this was simple - press tab and I would get the prefix. If I continued typing (and pressing tab), bash would complete as far as it could be certain of. I find this behavior to be much more intuitive but prefer the other features of zsh to bash.

Is there a way to get this style of completion? Google suggested setopt bash_autolist, but this had no effect for me (and no error message was printed upon starting my shell).

View 1 Replies View Related

General :: Cron Doesn't Start A Script

Jun 1, 2011

I'm trying to start a script through crond. The record in crontab is: 30 16 * * * /home/alex/ 1>/dev/null. The script works perfectly if I start it manually. But cron fails to start it.
What could be the reason?

View 9 Replies View Related

Debian :: Start A Cron Job From Runlevels?

Jun 3, 2010

I have made a shell script that is ran every 5 minutes (using crontab) that does the following:(please disregard the '.' in .. I'm under 15 post...can't post URLs yet ) Code: #!/bin/bashwget -q --read-timeout=0.0 --wait=5 --tries=5 -O /var/log/ "[$(date)] $(cat /var/log/" >>/var/log/dynamicDNS.logrm /var/log/ >/dev/nullexit 0 (this script might look pretty bad but hey, it's my first one!)hat works perfectly! Though, I need to have this "cron" run from startup (boot) without the need to open a terminal and leave it open.I understand I can use runlevels to start a program from boot but that will have it run only once.

View 5 Replies View Related

General :: Using TAB Completion In A Script?

Jul 28, 2010

Is it possible to use TAB completion in a script. For example I have a folder (A) that contain only one folder (B) and the script file.


mahmood@localhost:A$ ls

How can I send TAB key code in script?

View 2 Replies View Related

General :: Smart Tab Completion (for Directories)?

Aug 4, 2010

Are there shell versions that have a more intelligent tab completion? I'd like to be able to type cd foo-<TAB> Then it would show me the possible completions along with numbers that I can type to select one of them:

cd foo-<TAB>
(1) foo-bar1 (2) foo-bar2 (3) foo-bad

So, after <TAB> I would type 3 and it would take me to foo-bad. Alternatively, using the arrow keys instead of typing the number would be fine.

View 2 Replies View Related

General :: Making Bash TAB Completion More Like Cmd.exe?

Dec 15, 2010

I wondered if theres a way to do rotational style completion in bash similar to the behavoir on cmd.exe, I've found it speeds me up in regard to entering commands

View 2 Replies View Related

General :: No Command Completion For New Users?

Jul 18, 2011

I am using ubuntu 9.04. I created new users, & users logged in with their name & password. Everything is working fine. But when they open gui terminal or when they login using CLI(using ctrl+alt+f1), they will get only "$" symbol, instead of full path like pwd, hostname, etc. And if I do ls, it is listing the content, but command completion is not happening, i.e $cd Des(pressing tab). These all things can be fixed only after pressing "bash". So I don't always want to press "bash". So is there any way that I can fix this issue.

View 6 Replies View Related

Ubuntu Installation :: Cron Requires Manual Start After 10.04 Upgrade

Jun 24, 2010

After upgrading Ubuntu from 9.10 to 10.04, the cron daemon no longer runs automatically upon starting up the machine; I need to enter "sudo service cron start" to get it running. Is there a way to get it to start up by itself?

View 3 Replies View Related

General :: Handling Wordbreaks In Bash Completion?

Feb 16, 2010

I am writing completion function for one PHP framework called symfony. It has command line interface with syntax:


symfony [options] [namespace:]action

I want to make action be autocompletable. The function is simplest so far:


function _symfony_commands()
[ -r "cache/completion/.sf" ] && cat cache/completion/.sf


But, if there is : symbol which separate namespace from action problems coming:

symfony doct[TAB]
will be completed to
symfony doctrine:

But nothing happens if you want complete after : symbol. I've found out that for readline there is three words because it splits line with $COMP_WORDBREAKS



I played with $COMP_WORDS array and tried every thought I had to make it work, but failed.
What I should do to escape colon and make readline consider it as one word? Or there is way perhaps to workaround it?

View 2 Replies View Related

General :: Scheduling Shutdown After Download Completion?

May 20, 2010

Is there any way to schedule shutdown, from terminal,right after some currently running download in mozilla completes??

View 6 Replies View Related

General :: Use Tab-Completion In PuTTY Connecting To A Ubuntu Server?

Mar 12, 2010

I use PuTTY to connect to an Ubuntu Server (VPS). I would like to use Tab-Completion when I'm working with the command line on Ubuntu Server... How can I configure it?

View 1 Replies View Related

General :: Bash - Get Colored Output When Using Tab Completion In A Terminal?

Feb 27, 2011

Is there a way to get colored output when using tab completion in a terminal? My colors are fine everywhere else so I know that I've enabled a color terminal successfully. Using bash in Ubuntu (10.10).

View 1 Replies View Related

General :: Tab-Completion In Bash Indexing System Folders?

Nov 15, 2010

tab-completion indexes system folders (like /usr/bin, /usr/local/bin)! so say i'm in a folder that has two files, 'text' and 'myprog', i type in an 'm' then tab, and i get hundreds of results including 'mysql', 'mysqlconfig', and others as im sure you can imagine. is there a way to set it to default or something else that will only make it index the current folder?

i tried changing my PATH variable so i could execute programs in the current directory without './' - what i added to PATH was ':.' at the end (apparently this is not the way to do it... :S). i tried resetting PATH various times ('unset PATH', 'PATH=$whatever...') but this has not fixed the problem. using 'unset PATH', of course, removes everything from PATH, which meant that functions (like 'ls') in /usr/bin and /usr/local/bin can't be found. obviously i want those to be found, but i would rather not tab through them!

View 2 Replies View Related

General :: Windows Command Prompt Auto-completion With Forward Slashes?

Jul 26, 2011

I switch between Linux and Windows quite a lot and it's annoying the hell out of me that the Windows command prompt won't auto-complete directory paths when I press Tab if I use forward slashes like in Linux.For example, if I'm trying to navigate to a directory 'bin':

cd /path/to/dir/b <tab> - this won't auto-complete to 'bin'
cd path odir <tab> - this will auto-complete.

Can I tell the Command Prompt to use forward slashes instead?

View 1 Replies View Related

Ubuntu Servers :: Cron Sending Email From Address / Change The Default Domain Name For Cron?

Apr 29, 2011

Can anyone tell me how i change the default domain name for cron?everything i cron runs it emails from and to

this leaves me with a massive list of failed mails in postfix.i have mailto on my main crontab but i cant do it on all of them.

View 1 Replies View Related

Fedora :: No Output From Cron Jobs In /etc/cron.daily

Jan 29, 2011

I have added some executable scripts to /etc/cron.daily but don't get the stdout/stderr output from them as mail (or anywhere else I have found). At least one of them is running (because I can see that it has added a file to the disk).

The peculiar thing is that I do get the output from /etc/cron.daily/0logwatch (part of the logwatch package) as an email each day.

The MAILTO line in /etc/crontab is "MAILTO=root" (unchanged from default). Same for /etc/anacrontab.

I do have an alias at the end of /etc/aliases which redirects root's mail to my own account, but this alias works fine for mail I send manually. (It also appears to work fine for the output from the file /etc/cron.daily/0logwatch.)

View 3 Replies View Related

Ubuntu Installation :: Cron's /etc/cron.daily/apt Not Upgrading?

Feb 25, 2010

It seems that cron is not upgrading my Ubuntu 8.04 LTS Server, no GUI installed. I changed /etc/crontab and watched apt running:


ps -A | grep apt

showed it for a long time,


sudo tcpdump tcp

showed communication with canonical sites,




did not show any apt using CPU


View 2 Replies View Related

Ubuntu :: Do Cron Updates Erase Cron Entries

Sep 19, 2010

I put in my cron entries to run my backup script which rsyncs my data to my 2nd drive, however on a hunch I checked my backup drive which mounts automatically via fstab and I realize it had not ran in a while. I checked cron and there were no entries for it. I got to wondering if I should ever be worried about a cron update coming down and over-writing my existing cron file with the backup entries in it to run.

View 2 Replies View Related

CentOS 5 :: Setup A Cron In /var/spool/cron/root

Feb 16, 2010

I have set up a cron in /var/spool/cron/root

*/15 * * * * /usr/bin/

I can see in /var/log/cron that it is running every 15 minutes but it has no effect. It is not doing the commands in the bash script.

If I run /usr/bin/ right in the shell it works great.

View 3 Replies View Related

Software :: Vixie-Cron Not Running /etc/cron.d/

Feb 9, 2011

Is my vixie-cron broken? i have "0-59 * * * * root /usr/sbin/logrotate /etc/logrotate.conf" but it is not running in /etc/cron.d.


View 2 Replies View Related

General :: Will Cron Run If It Is Currently In Use?

Oct 28, 2009

I have a php script that checks versions of a remote stock file every 15 minutes. When it discovers that a new version is available it downloads the new file and runs it through a series of scripts that prepare it for an e-commerce application. It takes about an hour to import the file and process it. Otherwise, it echos "file on remote host not newer than local file". The stock file is updated every 3 or four hours and it's never at the same time. So we would like to run this script every 5, 10, or 15 minutes to make sure we have updated files.

So what happens when my php script finds a new file and takes an hour to do its work? Will the cron be activated three more times during this span? In other words, will it keep starting over even if its still running from a previous cron? Is there a way to stop the cron from running while the file download and processing occur, and then resume when its finished?

View 6 Replies View Related

General :: How To Use 'AT' Or Cron

Mar 17, 2010

How can I run a scheduled job in a specific hour minute second (hh:mm:ss) I tried "at" but I do not know how to send it "seconds".

View 5 Replies View Related

Debian Configuration :: Tab Completion Within FTP Server

Nov 14, 2015

I'm having a lot of difficulty trying to use tab completion while working in my FTP server from a terminal.I access this server with other Linux distros and OSX and the completion works fine. I've tried changing a lot of Debian config, but it seems to only affect the completion within the local scope.

Tab completion does work for system related tasks, no problem.

Debian 8.2/Kernel 3.16.0-4-amd64

FTP Server:
Trendnet TS-I300 NAS with FTP/upnp

Enabled in bashrc:
Code: Select allif ! shopt -oq posix; then
   if [ -f /usr/share/bash-completion/bash_completion ]; then
         . /usr/share/bash-completion/bash_completion
   elif [ -f /etc/bash_completion ]; then
         . /etc/bash_completion

View 5 Replies View Related

Fedora :: SSH Knowhost Bash Completion In F12?

Dec 10, 2009

New Fedora 12 install - I installed the bash_completion package, but it's not filling in knowhosts for ssh. It worked fine in Fedora 11. Is there something I've done wrong, or is this missing in F12?

View 6 Replies View Related

Ubuntu :: No Bash Completion With Sudo?

Apr 29, 2010

Just installed 10.04 64bit and in gnome-terminal i have no bash completion when sudo is used.For example:apt- gives apt-getbut sudo apt- does nothing, i get no suggestions from the terminal.

View 6 Replies View Related

Ubuntu :: .bashrc Function Tab Completion?

Jul 4, 2010

I tried to make a function to put in either my .bash_aliases or .bashrc file to make a local backup of a file, but when I call the function and try to use tab completion I get the following error:

cp: cannot stat `help': No such file or directory
The function I added is as follows:
function bk


Also interestingly, if I define this function at the prompt rather than in my .bashrc, tab completion works fine.

View 3 Replies View Related

Programming :: .bashrc Function Tab Completion?

Jul 5, 2010

I tried to make a (very simple) function to put in my .bashrc file to make a local backup of a file, but when I call the function and try to use tab completion I get the following error: Code: cp: cannot stat `help': No such file or directory The function I added is as follows:

Code: function bk
cp -f --backup=numbered ${1} ${1}.bak


View 2 Replies View Related

Software :: No Bash Completion With Apt In Su Session?

Mar 28, 2011

I have disabled root ssh logins for security. When I am logged in as a normal user over SSH and do a su into root the tab-completion stops working with apt. It still works when doing normal file-browsing, on the original user1, and it has worked previously when logged directly into root. How do I make it autocomplete again? I am using Debian Stable on a headless homeserver.

View 3 Replies View Related

Copyrights 2005-15, All rights reserved