General :: Crontab - Schedule Job To Run Every Minute?
Apr 14, 2010
I am setting crontab to run a script every minute irrespective of the current hour's value:
Code:
[root@localhost bin]# ls
sec.php showTime.sh
[root@localhost bin]# crontab -l
1 * * * * /root/bin/showTime.sh
[root@localhost bin]#
But it is not working. Does the line mean: "Run this script every day at hour:01"?
View 16 Replies
ADVERTISEMENT
Nov 2, 2010
my problem is that an application which I want to start at the startup is creating some problems if it is started at the startup. But if it is started after a few seconds or say a minute of the startup, it doesn't cause any trouble.
View 9 Replies
View Related
Jun 20, 2011
I have a problem need help, I want to do a schedule with using shell script with crontab in linux SuSE SLES 10.
1. I have many server that want to do backup mysql all from that server everyday. I need advice for for write shell script to backup all mysql in different server to server backup everyday and create auto folder as date example 27102009, 28102009..........for a month will has 30 folder in server backup.
2. Also need to write shell script to delete all folder but keep only one week last example from 1 to 30 it will has 30 folder in sever backup but i want to keep only 7 folder last and want to set schedule delete it every saturday night.
3. used that shell script with crontab in linux.
View 3 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
Mar 2, 2010
I want to schedule a Java program to run at a certain time, which will open a GUI progress monitor while it runs, and then terminate when it's done. I can execute it fine from the command line, but I it doesn't seem to work when I schedule it with crontab. In fact, I can't make any gui by scheduling it, not even something like gedit or firefox.
I know it's pretty rare that someone would want to do this, but is there any way to schedule a GUI app?
View 1 Replies
View Related
Jul 29, 2010
how to schedule shutdown every day using crontab
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
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
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
Apr 24, 2011
My KDE scrn-saver box to, Start automatically after 1 minute is left un-checked and my power mangement options are set to, Do nothing when idle, but every ten minutes my screen powers down?
View 4 Replies
View Related
May 2, 2010
I need to schedule for a repeated task on my Linux, as the followings:
-) Telnet to a remote node
-) Issue a command
-) Capture the output in a log
-) Logout from Telnet
-) Wait for a prescribed time interval
-) Then redo , but append the subsequent output in just on file
know which options do we have to write such a task?
View 7 Replies
View Related
Dec 7, 2010
Is it possible to schedule a process in the foreground? Lets say a cron schedule to be ran at 9:00. I would like to come back at 9:30, see how the process is running, and being able to interact with it... lets say kill it, or whatever. Is it possible? (Its not necessary to use cron, but it must be in Command Line)
View 6 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
Oct 17, 2010
I work as a part-time consultant developing webpages, both back end and front end.When developing a back end application I'm using a server running ubuntu server edition to host the application while I'm developing it.The problem comes when I want to upload my changes to the server, now I'm using Dropbox both on the client and the server, the problem is that sometimes I have to wait over a minute for the changes to be downloaded (when I'm working out-of-home that is) so I'm looking for a better alternative. My options seems to be:Some open source version of dropbox which syncs directly to my server (haven't found anyting that sounds viable though)
Mount my server via some protocol (NFS, SSHFS etc)
Push changes manually via FTP, git, svn or something else
I'd like the sync to be as transparent as possible, meaning I'd like to do as little manual work as possible.The client I'd like to connect runs either OSX or Ubuntu.The ultimate solution would be to use NFS + VPN though that would be alot of work to set up and also I don't like the security in NFS (matching UID's doesn't seem very secure to me)
View 3 Replies
View Related
Sep 13, 2010
I just want to know the distribution which is supported for longer time ex: Ubuntu will be supported for 18 months fedora for 14months. I repeat,I want a distribution which is stable,which I can leave without upgrading to next version for atleast 2 or 3 years. tell me other than Ubuntu LTS version
View 5 Replies
View Related
Aug 12, 2010
How to schedule a job using cron that shouldn't run between working hrs 9am-5pm, while run in non working hrs every hour, every day of the month, month & week.I tried the following way, not sure I can use logical not operator(!).
View 3 Replies
View Related
May 13, 2010
i want to use the command at to execute a script on a specific time FOR EXAMPLE :at 12:30pm but the script does not have to ececute at all, I DIT IT BUT THE SCRIPT EXECUTES EACH 12:30pm (that'sy problem) i want to write a script that will execute each two months from a specific time . for example: from january 12, 2010 the script has to run before march 12,2010
View 5 Replies
View Related
Mar 2, 2010
i want a service to be start at 8:00 and be ended in 14:00 automatically i already do this manualy by:
/etc/init.d/myservice.sh start
/etc/init.d/myservice.sh stop
i think it should be related to cron jobs.
View 1 Replies
View Related
Jun 24, 2010
Schedule disk scan on boot Ubuntu. How do I do this?
View 1 Replies
View Related
Jan 11, 2011
In a office network, how to queue incoming downloads and later, it will be scheduled by priority? Is there any such open source project /tool available? I have heard about squid proxy, but does it allow re scheduling ?
View 1 Replies
View Related
Apr 23, 2010
I am new to shell script and to this form as well, I did try to search for a similar post like mine here, but could not find one.
Here is what I'm trying to do:
I am trying to grep server logs to find a specific string and then capture the time stamp and the value of that grep string in them. The log file prints out messages on per sec basis.
My script is able to grep the server logs for the entire period of my load runs and then outputted it to a .csv file too.
Unfortunately this .csv file is too large to extract it on my PC and to generate graphs as it exceeds the excel limit. I need some help on how to read this .csv file in a shell script and then take an average on per min basis before I can export it out on my desktop and generate graphs for analysis. example of the out in my .csv file:
View 1 Replies
View Related
Sep 20, 2010
I did a search and came up with many different opinions and suggestions, and I could not find any similar threads for this (if there is I must apoligize in advance and did not look hard enough). I am trying to create a backup schedule for client computers and servers; and I would like your opinion on what I came up with. Here is network infrastrusture setup:
16 client computers
6 serevrs
- Primary and Secondary Web Server (RAID 1)
- Primary and Secondary Domain Controller (RAID 1)
- File/Print Server (RAID 5)
- Backup Server (RAID 1) with USB 2.0 1TB External Drive
Of course I will evetually upgrade to Tape Drives, but I am saving up for that. Anyways I want to backup ALL client computers, Primary Web and DC server, and File/Print Server. This will be done (of course) on the Backup Server) Here is the schedule:
[Code]..
View 2 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
Feb 1, 2010
I want to run a crontab job but it isnt working. I am writing in the crontab file with crontab -e Then I am waiting time but it isnt working. code...
View 6 Replies
View Related
Jan 5, 2010
If I configure a crontab like below.12 3 12 4 4 cat /etc/passwd I know that the cat command will get executed at the configured time. But where will the output of that command go?If it is something like below, then out put will be routed to /tmp/file1.12 3 12 4 4 cat /etc/passwd > /tmp/file1
View 4 Replies
View Related
Jun 1, 2010
I setup a cron job to trigger a script that I wrote every morning at 12:00 AM, but it does not seem to be working.
This is how I edit the job using crontab -e
Why it isn't triggering at 12:00 am every night. If I run the script manually it works just fine so I know is not the script causing troubles.
View 7 Replies
View Related
Apr 10, 2011
I know crontab -e sets a cronjob in /var/spool/cron but how do I set a cronjob to run from /etc/crontab? Is there a command used for this or would I have to manually edit a certain file?
View 2 Replies
View Related
Dec 5, 2010
I want to set up a crontab so that from my machine {which is 192.168.0.99}whatever I create in a directory called "/information" {suppose some texts files}will be copied to 192.168.0.100 and 192.168.0.101's machine "/readinfo" directory at 5.30 pm. everyday."/readinfo" is directory which is accessible by all users on that machines {192.168.0.100 & 192.168.0.101}is this crontab right?30 5 * * * /bin/cp -rf /information/* 192.168.0.100:/readinfo30 5 * * * /bin/cp -rf /information/* 192.168.0.101:/readinfoI guess first these 100 and 101 machines should allow me {99} ssh connection without passowrd.
View 5 Replies
View Related
Oct 20, 2010
My laptop's clock (Acer Extensa 5220) seems to be slow. I've corrected it 5 minutes forward last week and now have just corrected minute forward again. Is there a program [apart from time servers] to correct clock properly, for example, by shifting it a bit every hour? Is there already a program to put it to crontab or I should hack up a script? Or I should check more things?
I have found that HW clock is right, but system time is slow: about a second each 2.1 hours.
root@vi-notebook:~# dmesg | egrep 'clock|unstable'
[ 0.103785] Switching to clocksource tsc
[ 0.265274] Marking TSC unstable due to TSC halts in idle
[ 0.265514] Switching to clocksource acpi_pm
[ 1.321408] rtc_cmos 00:09: setting system clock to 2010-10-30 00:10:48 UTC (1288397448)
Is placing "hwlock --hctosys" to crontab a right thing?
View 3 Replies
View Related
Nov 1, 2010
Im new to linux, using ubuntu 10.04. I have been playing around with crontab and have no problems scheduling a job which runs a script file containing the following command:
However, when I try to do the following in the script file nothing happens..
Similarly the following doesnt do anything either:
Is there something im missing?
View 5 Replies
View Related