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

0
votes
1answer
21 views

crontab and binaries in /usr/local/bin

I am working in Redhat and have few programs located in folder /usr/local/bin I would like to call from crontab for root user. I thought that by putting binaries in that folder would be sufficient to ...
2
votes
0answers
17 views

Performance loss when having too many files in /etc/cron.d?

Is there an amount of files in /etc/cron.d that would lead to worse performance? There are currently about 50 jobs in. In the future there can be up to 200 files in. Am I correct to expect the cron ...
0
votes
1answer
24 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 * * ...
0
votes
1answer
68 views

How can I set the terminal encoding when running a crontab job?

I have a crontab job which executes a Ruby script on Arch Linux. It works basically, but when I call "googlecl" to post to my blog, it always shows a "safeDecodeError" exception (eg.: ...
0
votes
0answers
33 views

Accidentally ran crontab without option, now empty

I typed crontab into the command line (Linux CentOS) and hit enter. When nothing happened I hit Ctrl+D and the command prompt came back. When I went into crontab -e the file was blank but it showed ...
2
votes
3answers
195 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
53 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
104 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 ...
0
votes
1answer
74 views

Cronjob immediately shuts down mac after boot

I was messing around with cronjob trying to get it to forcibly shut down at a certain time everyday, but now I can't keep my computer on. It boots, loads whatever needs to load on startup, then ...
1
vote
1answer
70 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
24 views

Using undefined time in a crontab job

What happens if you program a crontab job like this: * * * * * the command Will it be executed every minute, or what?
0
votes
2answers
48 views

Is there any limitation on file names under Unix?

We are using crontab to schedule jobs and it was not picking the files for processing that contain [ or ] or ¿. Is there any limitation on file names or do these characters mean something in UNIX? ...
0
votes
1answer
205 views

Why does this bash script give an error on Ubuntu but not OSX

#!/usr/bin/env sh export $NODE_CONFIG_DIR=/Users/full/path/to/script/config cd /Users/full/path/to/script /usr/local/bin/node main The script runs locally on OSX (if I adjust the paths for the local ...
0
votes
1answer
158 views

Cron unable to run shell script

I have been trying to get a shell script to run for hours using cron to no avail. I am trying to have the following bash script run every minute #!/bin/bash ...
0
votes
1answer
678 views

Can't get a script to run on startup in Debian 7

I want to get this script to run on startup on my Debian Wheezy server: /usr/bin/bitcoind so I go: $ sudo crontab -e @reboot /usr/bin/bitcoind 2>&1 >/tmp/bitcoind.out & Then save ...
0
votes
0answers
23 views

deleted crontab on remote machine, but I don't know how

Here's the scenario: I have ssh access to internal.foo.com through bridge.foo.com. I wanted to make a local copy of the crontab from userx on internal.foo.com. My user has sudo access on ...
0
votes
1answer
56 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
0answers
57 views

Macbook with lid down goes back to sleep right after scheduled wakeup

I'm trying to run an app from crontab at 3 in the morning. My 2010 MacBook Pro running OSX 10.7.5 is usually turned off at this time of the night, so I'm setting Energy Saver's scheduled wake up at ...
1
vote
2answers
261 views

Run Crontab anytime after 4pm

I am trying to run a script through crontab in osx 10.8.5 that will run at 4:30. 30 16 * * 1-5 /Library/Frameworks/Python.framework/Versions/2.7/bin/python /Users/lego90511/PycharmProjects/Stock\ ...
0
votes
2answers
72 views

Automating python script on a mac not running

I have tried to have this question answered twice now(1, 2). While both were informative none of the solutions have worked, and I don't know why. The first solution was to use launchctl the second was ...
0
votes
1answer
93 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
89 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?
1
vote
3answers
214 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
2answers
351 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 ...
0
votes
1answer
48 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
638 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
72 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
426 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
393 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
580 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
100 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
77 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 ...
1
vote
1answer
46 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
3answers
119 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
81 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
137 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
327 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
105 views

Why the command substitution in the crontab job doesn't work?

crontab -l: * * * * * /Users/michel/Desktop/myScript.sh myScript.sh: #!/bin/bash /usr/local/bin/growlnotify -t 'Fact' -m "$(/Users/michel/Desktop/anotherScript.sh data.txt)" -n 'myApp' it ...
1
vote
1answer
144 views

Why echo $(crontab -l) outputs current working directory listing and only then the content of crontab file itself?

So if cwd is the /tmp now: crontab -l > #min hour day mon dow command > * * * * * /usr/local/bin/growlnotify -t 'helloTitle' -m 'helloMessage' -n 'myApp' -sw but: echo $(crontab -l) > ...
0
votes
1answer
99 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
91 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
1answer
2k views

Running Cronjobs as per Local Time rather than Universal Time

On running dpkg-reconfigure tzdata in terminal and i get 2 different time on my machine Local time is now: Wed May 1 11:58:55 IST 2013. Universal Time is now: Wed May 1 06:28:55 UTC 2013. ...
1
vote
2answers
836 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
62 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
154 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
0answers
73 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 ...
2
votes
1answer
184 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 *