Crontab is a short form of cron table. It is a configuration file that specifies shell commands to run periodically on a given schedule.

learn more… | top users | synonyms

1
vote
1answer
53 views

crontab schedule rule misunderstanding

I've got some strange behavior of one rule working unexpected. */40 * * * * myshellcommand here I though it would run each 40 minutes, e.g. 00.00 00.40 01.20 02.00 etc but instead it runs 00.00 ...
0
votes
1answer
102 views

Why nothing happens after crontab?

After executing fllowing command cursor skips to new line and nothing happens user@machine:~$ sudo crontab Why?
1
vote
2answers
514 views

Automate python script mac

I want to set up a python script to run every weekday(not sunday and saturday) on my mac OSX 10.8.4. From what I have found so far, it looks like I want to use cron. But before I do something horrible ...
1
vote
3answers
306 views

Crontab job doesn't create db backups with `mysqldump` command

When I type in my VPS: $ mysqldump --opt --user=root --password=myPass dbName>/home/myuser/dbName.sql it works and makes a backup of my dbName, but if I do it from a crontab job, it creates an ...
0
votes
1answer
61 views

sending the date in the subject in crontab

In crontab I have the following cronjob working. 0 0 * * * mysqldump -e --user=root --password=MYPASSWORD MYDB | gzip | uuencode db_date +"\%Y-\%m-\%d".gz | mail -s 'date +"\%Y-\%m-\%d"_dump' ...
0
votes
2answers
925 views

Do I need postfix for /var/mail/root to work?

I want crontab to log errors. As far as I know, this is being logged to /var/mail/root, but it doesn't seem to be working. Do I need to install postfix for this to work?
1
vote
0answers
84 views

setting a cronjob in IST time [closed]

I am trying to set a cronjob run in a different timezone..i have goolged a lot and found editing /etc/default/cron is the way to go...but this file is deprecated and I see the following message,so I ...
0
votes
2answers
514 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
3answers
519 views

Run crontab non-interactively from script

I would like to schedule some tasks on remote servers by script but am having an issue with crontab expecting to be run interactively the first time. As far as I understand crontab needs to be ...
2
votes
2answers
887 views

Working with git via crontab

I have the following shell script #!/bin/bash REPODIR=$HOME/work/repository/ cd $REPODIR var=`git fetch --dry-run 2>&1` echo $var > $HOME/error.txt I want to run my script every minute, ...
0
votes
1answer
129 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
0answers
89 views

Enabling crontab logging on openSUSE

I am trying to enable the crontab log on openSUSE 11.3. I searched the web but couldn't find how to do it. I only find information about Ubuntu. Tried editing the /etc/rsyslog.d/remote.conf file but I ...
0
votes
3answers
131 views

OsX Crontab having no effect

I am dynamically appending cron tasks to the user crontab The tasks seem to be getting adde, crontab -e looks like: */10 * * * * /bin/sh /Users/john/Kiosk/app/content/update.sh @reboot /usr/bin/open ...
1
vote
1answer
94 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 ...
1
vote
1answer
176 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
416 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 ...
0
votes
1answer
118 views

Setup Crontab to work with Cucumber

I'm trying to setup crontab to work with cucumber. So far, I were able to get crontab to execute a ruby command, but not a cucumber command. This is what I have in crontab: ~/test.sh > ...
0
votes
1answer
94 views

crontab setup on Mac

I'm trying to setup a crontab on the Mac. It just simply prints the message "Hello there!" to the console at a specific time, but it doesn't seem to work. Below is what I have in the crontab: 28 16 * ...
1
vote
3answers
367 views

cannot access crontab with sudo after being added to /etc/sudoers list

My user "craig" is in the /etc/sudoers file on my CentOS 5.6 VM, however when I try to access the crontab using the command below I am presented with an error message: sudo crontab -e -u ...
2
votes
0answers
81 views

Mac Crontab Deleted

I was messing around with creating cron jobs and somehow I wound up deleting crontab out of /usr/bin. Does anyone know of a way that I can recover it without having to re-install multiple components ...
1
vote
2answers
1k views

I want to run an rsync command at midnight but make it stop at 8am. How can i schedule the start AND END of a command?

I want to run an rsync command at midnight but make it stop at 8am. How can i schedule the start AND END of a command? I've looked into cronjobs but that will only start at a certain time. Any ideas ...
0
votes
0answers
68 views

Crontab not wroking

I have created a script in Ubuntu. Here is the script: #!/bin/sh DISK_SPACE=`df -k | grep sda1 | awk '{print $5}' | sed '$s/%$//'` DISK_SPACE_LIMIT="58" if [ $DISK_SPACE -gt $DISK_SPACE_LIMIT ] ...
1
vote
1answer
214 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
41 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; ...
2
votes
1answer
475 views

If I schedule a cron job to run at midnight, will it run at the start or end of the day?

If I schedule a cron job to run at midnight on a specific day, will the job run at the beginning of the day, or at the end of the day? For example: # Runs at midnight on 20th February: 0 0 20 2 *
0
votes
1answer
66 views

Long-lasting command in crontab

I want to put execution of my script in crontab every 1 hour. I wrote script that record stream using streamripper. Duration of each stream will be 7 minutes. Is it safe to put this in crontab? Maybe ...
0
votes
2answers
1k views

Execute a root command every 24 hours after startup

I want to execute a command as root on an Ubuntu 11.04 machine every 24 hours. This machine is not on all of the time, but when it is, it can be left on for days at a time. How should I correctly ...
0
votes
0answers
371 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
629 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 ...
0
votes
3answers
764 views

Shell script works directly, but has a syntax error via crontab

I have a shell script to automate a git commit and push every night: auto_git_push.sh #!/bin/sh function automate(){ git add . git commit -am "automated push $(date +"%Y-%m-%d")" git ...
0
votes
3answers
1k views

Simple Cron task in Mac OS X Lion

I am trying the Cron facility in Mac OS X Lion, but it does't seem to work. The crontab looks like this: MacBook-Air-de-Vincent:run vincentle$ crontab -l MAILTO=bxxxxxxxx@gxxx.com * * * * * (echo ...
11
votes
5answers
76k 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?
-4
votes
1answer
77 views

Schedule a cronjob start everyday automatically [duplicate]

Possible Duplicate: Is there a way to have Linux run a command every X minutes? I want to run a command which will be synchronize my remote folder data to my local computer. command is sync ...
0
votes
1answer
3k views

Python script not running as cronjob

I have tried everything and I've seen other questions here regarding this but I cannot for the life of me run a python script as a cronjob. I've tried the following. * * * * * /usr/bin/python ...
3
votes
1answer
3k 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
3answers
2k views

Why does this crontab file only run once?

I have the following crontab file: 2 * * * * /bin/date >> /home/jon/date_from_cron.txt I think this means "run every two minutes". However, it only runs once. Shortly after setting up this ...
0
votes
1answer
106 views

crontab script don't execute if console is closed

I'm using Debian 6.0.6. I edited root crontab a few days ago to add this line: 00,10,20,30,40,50 * * * * /root/Scripts/con_switch6.sh >> /var/log/con_switch_diario.log 2>&1 I'm ...
4
votes
2answers
1k views

Can Ubuntu play a video via cron job?

I'm developing a display system for a paint shop. I've set up a computer with Ubuntu to run the video and display it on a TV, running a PHP script that should update the video every hour via the ...
0
votes
2answers
754 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 ...
0
votes
1answer
270 views

Why is this CRON failing to execute?

$ crontab -l # # m h dom mon dow command SHELL=/bin/bash * * * * * (/usr/bin/curl -s -XPOST http://internal.ip -H 'Content-type: application/json' -d 'data') $ ls -l /usr/bin/curl -rwxr-xr-x 1 ...
0
votes
1answer
2k views

Why is this cron not working?

I've made a script that backs some files up and puts them in a folder, When I do sudo /data/backups/scripts/nightlybackups.sh It works, I just want to make it a cron job so that it runs every ...
1
vote
1answer
299 views

Difference between 0,10 and */10 for crontab?

I wanted to run a cron every 10 minutes. What's the difference between the syntax 0,10 and */10?
0
votes
0answers
32 views

This weird behaviour from cronjob

I have set the crontab like this: */5 0 * * * /www/permitChat.sh and the /www/permitChat.sh is this: # We are setting the name of file # in the variable along with complete path. sFilePath=`date ...
0
votes
1answer
96 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.
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
0answers
153 views

Crontab crash when running a script that insert a lot of lines in MySQL

My crontab is crashing when I run a script that insert alot of lines on MySQL Database, but when I run a script that inser few lines it run properly, is there some configuration file of cron? Maybe ...
1
vote
1answer
850 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
105 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
445 views

Is there a way to predict the next execution time for a crontab job?

I'm configuring crontab jobs on an Ubuntu server and I'm trying to figure out how can I predict the next execution time for my jobs individually. It's just a matter of making sure I configured the ...