0
votes
0answers
14 views

setting gvim as editor for crontab

I've see many post saying that by setting the following evnironment variable EDITOR=vim or VISUAL=vim will allow to use vim as code editor for crontab. I would likt to try to use gvim instead ...
1
vote
0answers
34 views

How can I run a cron job from PM to AM? [duplicate]

I want to execute a script once an hour from 20:00 to 08:00. Would the following work? 0 20-8 * * * location_of_script_to_run I'm currently using the following: 0 20,21,22,23,0,1,2,3,4,5,6,7,8 * * ...
2
votes
3answers
108 views

crontab still sending emails even with > /dev/null

I have a crontab (root) that runs a script and output is set to > /dev/null but I always get the emails whenever it runs. I only want to receive error emails. # Rackspace driveclient update (12pm ...
1
vote
3answers
48 views

Execute script when process reaches 6 hours of lifetime

I wonder if it's possible to execute a perl script when a process with a given PID file reaches a total of 6 hours of lifetime? Can this be done through crontab or similar? The perl script I want to ...
0
votes
1answer
61 views

redirecting output in crontab

I have a shell script to monitor table stats and java apps. It works fine when I run manually. But if I put it in the crontab it will get stuck if I don't redirect it's output with export display ...
1
vote
1answer
63 views

Shutting down Linux server on first Wednesday of every month

I have written a crontab entry as: 00 19 1-7 * 3 /sbin/init 0 It should turn my linux server off on the first Wednesday of every month. Unfortunately the server went off on today (Thursday). Can ...
0
votes
1answer
52 views

scheduling a script that accepts one argument in crontab

i am trying to schedule a shell script that runs for every 10 mins, and the script accepts some argument.. i have done it like this 0,10,20,30,40,50 * * * * sh ...
0
votes
1answer
90 views

Why nothing happens after crontab?

After executing fllowing command cursor skips to new line and nothing happens user@machine:~$ sudo crontab Why?
0
votes
1answer
79 views

Getting crontab error on Xubuntu

When running the command crontab -e i get the following error: no crontab for 'myusername' - using an empty one 888 Can anyone please help?
0
votes
2answers
366 views

Linux - starting a visible terminal on boot

I have a C program I wrote for debian on the raspberry pi that asks the user to enter a number, 1-4 which it then stores in a configuration file. This only happens if the configuration file is ...
0
votes
1answer
85 views

How can I sync cronjobs from one server to another?

What is the configuration file that defines the cronjobs? I know you can crontab -e, but it points to a temporary file.
1
vote
1answer
69 views

Job shows up in crontab -l but not in /etc/crontab

There is a certain job that shows up when I do $ crontab -l and I can verify that this is also running. However, the job is not listed in /etc/crontab. Say the job is /somedir/somefile I can't ...
0
votes
1answer
124 views

I created Cron but I get errors that don't really understand

I created a crontab like this: 0 22 * * 2 /bin/echo " Hello World " 0 1 * * * /bin/echo " Test" but I receive mails like this, what does it mean? Subject: Cron /bin/echo " Test" ...
0
votes
2answers
296 views

Linux - switch to “cron” user

Sometimes i have issues with cron jobs not running, and diagnosing why can be difficult. What would be useful is to switch to the same user as the cron jobs run under, so i can see if there's a ...
1
vote
1answer
139 views

Why crontab command is not available to me even I am root

I am using the CentOS release 6.3 (Final). My problem is that even I have logged in as a root to my centos server through ssh crontab command is not available to me . I got the following when ever ...
0
votes
1answer
40 views

two crons not running simultaniously? [duplicate]

MAILTO="" */10 * * * * /bin/bash /var/www/sym_monitor/sym_start.sh > /var/www/migrate/root_start.txt 2>&1 */10 * * * * /bin/bash /var/www/sym_monitor/stop.sh > ...
0
votes
0answers
12 views

shell script not running the other script inside it [duplicate]

#!/bin/bash value=$(</var/www/sym_monitor/man.txt) if [ "$value" == "true" ]; then ps -ef|grep sym |grep -v grep |awk '{ print $2 }'|sudo xargs kill -9; cd /var/www/symmetric-ds-3.1.6/bin; ...
0
votes
0answers
277 views

Issue in running cron jobs in RHEL5

When I try to run cron jobs from root, I am getting the following error. I am using RHEL5. Can anyone help me? [root@localhost]# crontab -e Permission denied You (root) are not allowed to ...
4
votes
1answer
438 views

system-wide crontab vs. user crontab to shutdown pc

I'm trying to shutdwon my pc at 2 am once a week. If I use the user crontab of root (sudo crontab -e) 30 2 * * 3 shutdown -h now the shutdown will not be performed. However, if I place the same ...
2
votes
1answer
2k views

Linux - check when crontab file was last amended

How can i get the last updated date/time of the crontab file. not when cron was last run but instead when was the crontab file amended last
1
vote
1answer
454 views

Set default editor for crontab -e invoked with sudo

I'm using Bash on Debian Squeeze. I just read this topic: change default text editor for crontab to vim I have exported both variables VISUAL and EDITOR to vim for normal user and for root. And this ...
0
votes
1answer
440 views

Crontab is using some sort of hidden cache?

I used to have a crontab that ran like this * * * * * /usr/bin/php /var/www/vhosts/default/htdocs/agent/time_keeper.php > /dev/null 2>&1 It worked fine. Now I moved that php script to a ...
0
votes
2answers
465 views

Error setting up Crontab

Trying to set up a cronjob: 0 12 * * * /usr/bin/mysqldump --all-databases > /backups/mysql/`date "+%Y-%m-%d"`.sql Getting error: crontab: installing new crontab "/tmp/crontab.fuly8s":2: bad ...
3
votes
1answer
2k views

How do I make crontab generate a unique log each time it runs a job?

Here is the crontab job /usr/local/bin/python2.7 /home/scripts/script.py >> /home/scripts/logs/log.log 2>&1 How do I generate a new log every time the job is run? I am cool with ...
0
votes
1answer
88 views

Crontab as other user

I am running crontab as root user: screen -S konsola -X stuff 'say hello'`echo -ne '\015'` How do I run it as the user "nobody"? Only this user has screen with given pid, thats why I need it.
1
vote
1answer
587 views

Are there good reasons to have a single cron job run multiple comands [closed]

How would cron handle a job that executes multiple commands. As an example I have a cron job that looks like this. Which gets very difficult to read. 10 0 * * * firstscript.sh > first.log; ...
1
vote
1answer
87 views

crontabs hour specification */1 is that the same as *

I am looking for clarification with the cron tab that I am working with. some job 1 * * * * some job 1 */1 * * * Are those jobs the same? The job will run the first minute every ...
0
votes
1answer
322 views

Cron job for moving directories older than 24 hours

Well, what I want to do is The cron should run every hour or so It should move the directories in a folder /disk1/data/ older than 24 hours to /disk2/data/ The directories moved should contain all ...
1
vote
2answers
343 views

Why cron saves at /root, when should at /var/www?

Why my cron */1 * * * * /usr/bin/php /var/www/query/query.php &> /root/querylog.log saves query.php output in the /root/ folder? (this script shall save *.txt at its location) It should do so ...
0
votes
2answers
1k views

Issue pushing file from linux to windows with smbclient

I have a file located on my linux box that is generated by a python script, the file is dropped inside of the /root/ directory My bash script looks like so: #!/bin/bash # Run the HR Data feed cd ...
1
vote
0answers
256 views

What happens if cron.daily is not terminating

Today I had to realize that some cron jobs werent run on my server! In the log files I find this: Mar 13 03:30:01 osp-server anacron[7261]: Anacron 2.3 started on 2012-03-13 Mar 13 03:30:01 ...
1
vote
3answers
1k views

What do slashes “/” mean in crontab?

I'm seeing slashes in some crontab examples, I don't understand what they mean? Check this one out for example */10 * * * * /home/ramesh/check-disk-space ...
0
votes
1answer
63 views

I can not find specific cron running at *:21 and *:56 on Debian

I am frustrated. I have two mystic crons running on our server, that I can not find by doing crontab -l. The good thing is these crons are sending mails. That is how I know those are running at :21m ...
2
votes
2answers
191 views

How can I change the directory a command thinks it is running in?

How can I run a command that is in a different directory so that the command thinks I've ran it in the current directory? If a command is using basename() or argv[0] (or whatever it's called) to get ...
2
votes
2answers
620 views

Do jobs in root's crontab still execute when logged in as another user?

I have edited my root's crontab. Will root's cron jobs still run when I'm logged in as another user?
1
vote
1answer
282 views

Cron not executing jobs

I'm having trouble making cron work. I edit my cron jobs doing sudo crontab -u myuser -e sudo crontab -u myuser -l prompts my cron tables: ##### */1 * * * * /home/myuser/Projects/scripts/cron.sh ...
9
votes
2answers
5k views

Difference between /etc/crontab and “crontab -e”

What is the difference between the crontab located in /etc/crontab and the crontab that can be edited using crontab -e?
5
votes
2answers
2k views

Only email on cron errors for jobs in cron.daily, cron.hourly, etc

I have several cron jobs that run (in /etc/cron.daily, /etc/cron.hourly, /etc/cron.weekly, etc.) and email root@localhost with the results. I'd like to stop those emails if the jobs are succeeding, ...
2
votes
2answers
7k views

How to create folders according to date in Linux?

Is there any other short/easier and smarter way to do the following in Linux? cd /home/abcd/dammi mkdir $(date +%Y-%m) cd $(date +%Y-%m) mkdir $(date +%d) # RESULT : /home/abcd/dammi/2011-05/26 cd ...
0
votes
2answers
940 views

RHEL6 Crontab doesn't work properly?

In RHEL6 root's account I have crontab job: 30 6 18 4 1 /sbin/init 6 It worked fine on the 18th of April and properly restarted my system, BUT it also restarted my OS at 6:30 on next Monday - ...
4
votes
2answers
708 views

From what context is a cron task executed?

I am asking this question after royally destroying a Linux box. Let me give you some background so you know where I am coming from. I currently have (well... did have) a RedHat Linux box running ...
2
votes
2answers
3k views

Cron ignoring an update to crontab

I've commented out a line in the crontab on a debian server, which I guess was there by default yet was causing me to get error emails every hour: # m h dom mon dow user command 17 * * * * root ...
0
votes
2answers
5k views

How to stop all instances of cron?

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 ...
0
votes
2answers
649 views

Following script doesnt run as cronjob

snailmail.sh #!/bin/bash echo "Test" >> /tmp/out /usr/bin/kdialog --title "MAIL RECIEVED" --msgbox "mail recieved!!" crontab -e #CronJobs located in $HOME/cronjobs/* * * * * * ...
0
votes
2answers
637 views

cron job not working

It is little weird now that cron job is not working as i have set. I have set weekly job to send email but i am receiving multiple emails daily. Below is my code; # sends email every monday at 4:00 ...
1
vote
2answers
1k views

Why are some of my cron jobs not sending deamon emails?

My crontab: PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=admins@boingoboingo.com HOME=/ LD_LIBRARY_PATH=/usr/local/lib/ # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | ...
0
votes
3answers
325 views

How to run a job on first login of each day using cron or something similar?

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 ...
1
vote
1answer
440 views

Linux cron job error

I have setup a cron job to run a PHP file every 30 minutes: lynx -source public_html/scripts/file.php The result comes through to an email but seems to get this error: Can't Access ...
8
votes
5answers
63k views

How to execute shell script via crontab?

I have a notify.sh script that looks like: notify-send "hi welcome" My crontab notification for 2 PM: 0 14 * * * home/hacks/notify.sh However, this doesn't work. What is the problem?