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

2
votes
2answers
847 views

Crontab : Permission denied

My crontab (running as user) contains the following command 00-59 00-23 * * * /usr/bin/smbget -R smb://192.168.10.32/Data -u USER -p PASSWORD But I am getting an error as You don't have ...
1
vote
1answer
278 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 ...
1
vote
1answer
237 views

View the event list of a cron file

I have a relatively complex set of cron jobs running and it would be really useful for me to ask the system for the list of the next n cron tasks that will be performed. So given a particular ...
6
votes
2answers
4k 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
1answer
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
6k 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
507 views

How to setup crontab on dedicated server to dump WordPress MySQL database and email it to a Gmail account

I know I can do a mysql dump for my WordPress databases on my dedicated server. But I want to do this automatically, and I want the dump to be emailed to my Gmail account. Is this even possible?
0
votes
2answers
99 views

different way of editing crontab

I have two ways editing crontab 1. edit /etc/crontab, then restart crond 2. crontab -e crontab in both cases I am logged in as root. what are the differences?
0
votes
2answers
660 views

How to get log of running cron job

How can I tail the running cron job, so that I can come to the conclusion that my job is going on.
0
votes
2answers
915 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 - ...
2
votes
1answer
844 views

Deleting files and emptying trash using cron

I'm new to making crontab files and I decided to try and make a job that would delete the contents of my Downloads folder, and then empty the trash. This is what I have: 0 9 * * * rm ...
4
votes
2answers
659 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
2k views

How to execute a php file with crontab?

I have ubuntu setup with lamp and I was wondering what I would type to start a php page say at 2am everyday. I am still studying how crontab works so I can't test to see which one works. So if I ...
0
votes
2answers
972 views

How to specify default MTA?

I'm trying to use the MAILTO function in crontab on my mybookworld (it's a NAS) I've installed a rather unfamiliar (i think) MTA: ESMPT With mutt (console based email client) it works perfectly. But ...
1
vote
1answer
193 views

How can I automate or script daily downloads for any new anti- virus databases, and then have the program scan my drive?

(I know there are much better softwares out there for the Mac so please don't go there! The politics of this company dictate which Anti virus we have to use) Anyway without any further wait: ...
2
votes
2answers
5k views

how to run cron jobs on GMT not local time?

How can I make cron jobs run on GMT, not local time? this is my crontab file: #m h d m wday command TZ=GMT 5 0,6,12,18 * * * ~/Documents/bash/transfer.sh my jobs seem ...
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
1answer
50 views

Cron that needs more time than he's allowed to

My crontab runs a cron every 5 minutes... If the cron needs more than 5 minutes to run, can this be a problem?? Can the problem be with the commands the cron runs? Thanks for your answer ;-)
4
votes
2answers
2k views

cron can't read PYTHONPATH environment variables?

I have added to the PYTHONPATH on my server's .bash_profile file. However it appears that cron isn't reading from it because I am getting import errors. If I run the exact command cron calls on the ...
0
votes
4answers
558 views

cron jobs made in cPanel don't show up in PuTTy

Why don't cron jobs, that I have made in cPanel, show up when I use PuTTy and type crontab -l?
0
votes
0answers
1k views

Running a bash script at random times using cron job

I need to monitor intrusion on a server at (relatively) random intervals. For that I have set up a cron job to run every hour. I have written three scripts: wrapper script that calls a ...
1
vote
4answers
2k views

mysqldump cron not dumping

I am attempting to setup a cron to use mysqldump once a day. There is no output and I cannot see any database usage while watching top. The crontab is: mysqldump [database] -u[user] -p'[password]' ...
1
vote
1answer
105 views

Cron jobs and clipboards

Pbpaste doesn't seem to work as expected when I run it from a cron job. I have an applescript that opens a PDF file in Preview and sends it the copy command and then closes Preview. Next I'd like to ...
0
votes
2answers
4k 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
621 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
583 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 ...
3
votes
4answers
1k views

Is it possible to use variables in crontab -e?

Can I say: MYPATH=/root/scripts MYSCRIPT=doit.sh 0 1 * * * $MYPATH/$MYSCRIPT in crontab -e ? Is it possible to use variables in crontab -e ?
1
vote
1answer
136 views

Making files created by a cronjob readable by apache

A software package I installed on my Fedora box has an associated cronjob. This cronjob creates html files that need to be readable by apache. At the moment, the files are not readable because they ...
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=[email protected] HOME=/ LD_LIBRARY_PATH=/usr/local/lib/ # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | ...
1
vote
2answers
101 views

What does everyone have running in their cron?

In cron I run a bunch of regular maintenance stuff on my production server. I was wondering what everyone else runs in theirs. Is there anything novel? Is there anything very basic that noobs ...
4
votes
2answers
946 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 ...
2
votes
3answers
8k views

Crontab not working in Ubuntu 10.04

I installed it in a machine at work and it wouldn't do anything, no matter what I did. So now I have it on virtualbox at home and it also doesn't work. Here's what I'm trying to do: Have a file on ...
2
votes
1answer
921 views

Cron job on Mac not running during sleep

I have a cron job that will mail a list of all Google Tasks to my email address daily at 7am. (http://privacylog.blogspot.com/2010/07/api-for-google-tasks.html) I am running this on my laptop which, ...
0
votes
3answers
315 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 ...
0
votes
1answer
520 views

Running an Automator task at night

I've just created an Automator workflow and I'm using crontab to execute it at night. The problem is that, after a while, the machine is going to sleep and a password is required (this is the intended ...
0
votes
3answers
2k views

Run a shell script using cron

I have this FeedIndexer.sh: #!/bin/sh java -jar FeedIndexer.jar Just to run FeedIndexer.jar which is in the same directory as the .sh, I would like to run it using crontab, so I did this: # ...
1
vote
1answer
420 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 ...
9
votes
1answer
6k views

Run a cron job every 5 minutes between two times

Is there a way to specify a job that runs every 5 minutes between some start time and some end time on business days in a crontab? Update I think it's relevant that my start and end times are not at ...
1
vote
3answers
443 views

Ubuntu Crontab error

I want to list files at 12h01. How can I set my crontab to do this? pedro@Pedro-PC:~/PL/trab4$ crontab -l # 01 12 * * * ls -l
0
votes
0answers
413 views

user crontabs don't work, only /etc/crontab

Hi when I use the command crontab -e to set up cron, the commands get triggered (according to syslog) but nothing happens. Also if I run sudo crontab -e. The only way to actually get cron working ...
2
votes
2answers
1k views

stdout and stderr of script doesn't get redirected when executed by cron

./script &>> log.txt I get a nice logfile, but if I have the same command executed by cron, lets say the crontab looks like this: * * * * * '/home/user/script &>> /home/user/log.txt' ...
3
votes
1answer
6k views

Running program every 2 minutes with crontab

What does 2 * * * * means in crontab context? I want to run my program every 2 minutes; is that what 2 * * * * means?
-1
votes
2answers
96 views

unable to use cron tab

I am using crontab on unix shell using putty to connect to unix server unable to use crontab i scheduled crontab at say * * * * * cat > new < new1 doesnt work I works only in home directory of ...
1
vote
5answers
12k views

How to use crontab to run a script as nobody

This is on a CentOS machine. I'm trying to run a script as user nobody (or as a user with minimal permissions) at a certain time every day. Here is nobody: [root@CentOS % ~] grep "^nobody" ...
0
votes
1answer
251 views

linux crontab issue

I got this funny problem. I have an entry in the in cron like this 50 15 * * * /pmecs/log/lsmon/techsupportscript.sh 2>/pmecs/log/lsmon/cronerror.log Now, from what i know, this is correct ...
2
votes
1answer
646 views

How do I compress a directory on a Unix web server and email it on a sheduled basis?

After hearing about various high profile website creators getting stiffed recently after hardware failures on their servers I would like to implement a backup strategy on my websites. I have cPanel ...
7
votes
5answers
55k 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?
31
votes
7answers
53k views

Run a command every week with Cron?

Simple question- what would a crontab entry look like for a command I want to run every week on Saturday at 8:05 AM?