General :: Use Cron To Install New Software?
Aug 6, 2010
i want to install new softwares using cron , i tried shell script : apt-get -y install packname and run the script using cron. it is not working so then i installed cron-apt but i am not able to understand how to use it
View 7 Replies
ADVERTISEMENT
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 user@com.com
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
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
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:
Code:
ps -A | grep apt
showed it for a long time,
Code:
sudo tcpdump tcp
showed communication with canonical sites,
but:
Code:
top
did not show any apt using CPU
[code].....
View 2 Replies
View Related
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
Feb 16, 2010
I have set up a cron in /var/spool/cron/root
*/15 * * * * /usr/bin/phplist.sh
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/phplist.sh right in the shell it works great.
View 3 Replies
View Related
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.
Code:
View 2 Replies
View Related
Feb 14, 2011
I have centos 5.5 (64 bit) on server which is hosted in remote data center. I just noticed that crontab is not installed. Server don't have internet access so yum won't work. Is there any way I can install cron manually by installing RPM? If yes from where I can get cron RPMs ?
View 2 Replies
View Related
Sep 15, 2009
When I boot I get this error:
Starting CRON daemondone
Starting smartd done
Starting VirtualBox kernel moduledone
[code]....
View 1 Replies
View Related
Jan 4, 2010
I installed a second HD, and formatted it to ext4. I gave it the "/backup" label. I am trying to figure out how to mount it so that I can run cron to backup my home folder onto it once a week. This is what the fstab looks like now
[code]...
View 9 Replies
View Related
Mar 19, 2010
Somehow Bind dns, Postfix, Cron all fail to start automatically at boot time? All of them need to be started manually after the system is up in order to function.
View 1 Replies
View Related
Apr 16, 2011
I have Compaq Presario CQ62-215DX notebook (laptop) computer with built in image of Windows 7. I use partitioning tool to create partition of 250GB hard drive. I created these partitions as NTFS partition. My issue is after creating partition of 75GB whereby I want to install Ubuntu using ubuntu-10.10-desktop-i386.iso file from dvd drive; I cant install.
I use ext4 file system to install ubuntu and mountpoint is root After user setup it stops at this point:
UBUNTU CRON [9354]: (root) CMD (cd/run-patsreport/etc/cron.hourly)
It doesnt install ubuntu on separate partition. how to install ubuntu on separate logical partition? Windows 7 is in primary partition.
View 1 Replies
View Related
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
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
Jun 24, 2011
i want to run my cron every day at 4:30am
304***php /home/lfncltee/public_html/Center/all_in.php >/dev/null 2>&1
View 2 Replies
View Related
Feb 17, 2010
I'm trying to run a php script from a cronjob and can't seem to get it working.
When I run the script from the shell command prompt:
The scripts works fine
I then inserted a cron job using:
And inserted the following:
And nothing seems to happen.
I left off the -q and have a few echo commands within the script but I don't get an email of the output either.
View 3 Replies
View Related
Apr 6, 2010
I am trying to set up a script that uses SCP and will run via cron to go out 3 nights a week and pull down the zip files that are created of my website on my hosting server. I am having trouble setting up the SCP script that will automate this. I don't want to have to enter a password each time. I know this can be done with public/private keys but need help with the syntax. Below is an example of what I have.
scp -i /.ssh/authorized_keys.pub usernameremotehost:/public/backups/*.t.gz /public/backups/
View 3 Replies
View Related
Jan 9, 2011
I have a cron job to schedule the task on the third sunday of the month.I saw the previous threads but didn't find any solution.
How the cron syntax can be written.
View 14 Replies
View Related
Dec 8, 2010
I have two shell scripts, one has to run after the other has finished running.I know that in cron.monthly they run in alphabetical order, but does each one run after the other has completed, or is it possible that the first may still be processing when the second is run?
View 1 Replies
View Related
Mar 14, 2010
I know that Redhat have a log in /var/log/cron , I can check the cron job log here , I would like to ask where is the log in Debian ?
View 1 Replies
View Related
May 8, 2011
I'm having a script / cron problem. i'm trying to run a script that backs up a postgresql database using a pgdump command.
I've included a simplified version of my script here.
The pgdump works fine, and outputs an SQL file.
The problem is with the tar command. it fails to correctly tar, and then compress, the .sql file when the .sh script is run from cron. but when run manually from command line (with sudo) it works well. Note ls -l printout, where the top lines were generated by cron (and tar & tar.gz are minisule), whereas in the second group the tar and tar.gz are much larger (and correct).
Note that the .sh script is owned by root, who is also the user in the cron entry. I tried using postgres as the user for all those, but i think i then had password problems. should i be using some kind of "credential"?
Here is the script and cron entry (cron in test mode to produce every 2 minutes):
Code:
View 1 Replies
View Related
Jun 7, 2010
I would have sworn this used to work, but now I'm not so sure.
I have a script that I want to run on the last day of every month. So, I have this as a cron job:
Code:
0 23 28-31 * * [ `date +%d` -eq `echo `cal` | awk '{print $NF}'` ] && /path/to/script
But it fails. I get mail that says:
Code:
command failed with exit status 1
/bin/bash: -c: line 0: unexpected EOF while looking for matching ``'
/bin/bash: -c: line 1: syntax error: unexpected end of file
I tried a slightly different syntax:
[Code].....
View 3 Replies
View Related
Jun 24, 2010
I have a simple script. When I run it as cron job. I jot email saying:/bin/sh: line 1: test.tmp: command not found.Even I took first line out, I got the same error.The current shell I have is /bin/tcsh.
View 4 Replies
View Related
Jul 24, 2011
The problem is I need the php program to send member email confirmation which contains a confirm link. Run every min may still make the member wait. So I like to make it to run every 20 or 30 secs.
I don't want to put the code to send email on my sign up page as that's no good.
But I don't want to put a sleep 30 sec on my php script and going on loop. If it failed in the middle then it may wait abit to start.
What can be done to achieve my goal and what's the best way?
Making a php script to run as a daemon process? Is that possible and okay?
View 9 Replies
View Related
Jun 8, 2009
Maybe this is a MySQL question, maybe not...
I've written a shell script to back up a database.
But when I run it, it prompts for password even though the script provides it. If I'm doing this manually, it's not a problem, but I want to make a cron job to do it...
Here's the script: Quote: #!/bin/bash
set -xv
#First let's rotate the backup files...
/bin/mv /home/cabazio/someDB-3.tar.gz /home/some/someDB-4.tar.gz
/bin/mv /home/some/someDB-2.tar.gz /home/some/someDB-3.tar.gz
[Code]....
View 2 Replies
View Related
Mar 30, 2010
Is there a command that can be run to verify that a users cron job has run successfully?
Platform is Ubuntu 8.04 LTS.
I have scripts in /home/useraccount/bin/
running
crontab -l
While logged in as user results in:
# m h dom mon dow command
@hourly /home/useraccount/bin/script_1
@hourly /home/locateruser/bin/script_2
I realize scripts could send email or write to a log with a timestamp, but wondering if there is just a way to verify it ran from the command line.
I ran
ps -ef|grep cron
... and it shows
root 4358 1 0 Mar12 ? 00:00:00 /usr/sbin/cron
Not sure if this indicates it is running the jobs though....
View 4 Replies
View Related
Jul 12, 2010
I need to run a script when i login for first time in a day. I may reboot or shutdown and then power on during the day. But i do not want the job to run during those power ups. It should run only once per day.
View 3 Replies
View Related
Oct 28, 2010
I have a cron job that executes a rake task in rails. I noticed in the log that it was running the task 4 times everytime it was executed. The problem is that there are 4 instances of cron running.
I ran code...
So my question is how do I stop the other instances. When I run the stop command now I get this:
Stopping crond: cannot stop crond: crond is not running. [FAILED]
Any ideas? Do the other instances have different names? Is there a way to kill all instances as once?
View 2 Replies
View Related
Feb 10, 2011
Is there a way for me to tell cron to run an app BUT not run it if a process exist already?
View 5 Replies
View Related
Jul 19, 2010
I have a friend who needs a script to reboot a system every 5 min... not sure how to set cron to do this every 5 min.
View 1 Replies
View Related