Crontab is a short form of cron table. It is a configuration file that specifies shell commands to run periodically on a given schedule.
0
votes
1answer
375 views
How do I make cron run a Java GUI application?
I have a script which runs a Java GUI application using "java -jar app.jar". I have added the script to the crontab to run every minute, check the processlist if the application is up. If it isn't it ...
1
vote
0answers
457 views
Why does cron task run twice?
I have a task that should run each day in Ubuntu10.04. So I use crontab and copy the scripts of the task to the directory /etc/cron.daily.
Here is the my crontab:
# /etc/crontab: system-wide crontab
...
1
vote
1answer
7k views
Crontab script on Mac OS X Lion does not work anymore
I have a problem with cron tasks. Previously this script worked fine on Mac OS X 10.6 server, but when I initialize it on Lion (client), this script stopped working.
Basically, this .bat file calls ...
1
vote
0answers
147 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 ...
0
votes
4answers
384 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?
1
vote
3answers
284 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
...
1
vote
5answers
9k 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
2answers
954 views
Disable cron jobs for a specific user
I have a list of jobs in the crontabs for user1, user2. I want to prevent the jobs of user2 from running.
I tried listing user2 in cron.deny, but that only prevents him from accessing his crontab. ...
0
votes
2answers
513 views
How to recover crontab jobs from filesystem
On my system I have fedora 13, which I can't get to boot right now.
I'm now running ubuntu 11.10 from a different partition.
From ubuntu I can read the fedora partition.
In fedora I had some cron ...
0
votes
1answer
56 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
531 views
Cron job not working consistently
I have a cron job:
1 0 * * * /usr/bin/wget -q -O /dev/null 'http://123.456.78.90/index/parsedata?&today=1'
It should gather a bunch of data from the DB at 12:01am each day, organize it for use ...
0
votes
2answers
444 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?
1
vote
1answer
243 views
Background Jobs from cron
I am running a cron on every two minutes. From the cron I am running other shell scripts in background with "&". After cron exits spawned shell script process still runs, this is desired behavior. ...
1
vote
0answers
190 views
Why isn't crontab working for me? (Ubuntu 11.04)
I can't get the crontab jobs running. I've checked /var/log/syslog and the scheduled jobs aren't there. I've edited the jobs with
sudo crontab -e
so they are created for root.
This is how my jobs ...
1
vote
2answers
313 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
4answers
1k 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]' ...
0
votes
0answers
127 views
Shellscript does not run from crontab
This script runs fine in terminal but not as a crontab entry:
#!/bin/bash
value=$RANDOM
while [ $value -gt 1800 ] ; do
value=$RANDOM
done
sleep $value
notify-send -t 7000 -i ...
0
votes
1answer
164 views
crontab -l output to file
I want to be able to output my current crontab to a file, in order to check and append it automatically.
crontab -l > somefile
creates an empty file. There must be a simple way of doing this, ...
2
votes
1answer
2k 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?
0
votes
2answers
661 views
Open a terminal from a Crontab
How do I get a gnome-terminal window to open from a crontab?
I have tried this:
* * * * * /usr/bin/gnome-terminal
* * * * * source /home/user_name/.bashrc ; /usr/bin/gnome-terminal
* ...
2
votes
1answer
1k views
crontab day of week vs. day of month?
I added this to /etc/crontab on a few different linux & freebsd systems:
# monthly reboot: 3rd Tuesday of every month
56 07 15-21 * 2 root /sbin/shutdown -r now
I want a reboot on the 3rd ...
2
votes
1answer
3k views
Bad minute in crontab?
I get the following error in my syslog:
Oct 17 13:14:03 tracker cron[873]: (*system*) ERROR (Syntax error, this crontab file will be ignored)
Oct 17 13:14:03 tracker cron[873]: Error: bad minute; ...
1
vote
1answer
85 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 ...
3
votes
1answer
77 views
If I restart crond, will scripts get interrupted?
I am changing my /etc/crontab file.
When I execute
service crond restart
will my jobs/scripts that just begun executing by crond be terminated or not ?
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:
# ...
2
votes
2answers
734 views
How to set CRON to execute a php file outside of a public html folder?
I have a php file located at, let's say, for example:
/data/web/process.php
This file is not publicly available (no virtual host is running in that folder, but apache is installed). I need to ...
1
vote
1answer
189 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 ...
2
votes
2answers
685 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 ...
2
votes
2answers
105 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 ...
3
votes
4answers
356 views
How do I add a job to cron?
So, here's what I did:
Logged in as root via Shell
Typed crontab -e
Typed */30 * * * * /path_to_website/cronjobs/cron.php
And now what? How do I save it? I just closed Putty and then logged back ...
2
votes
1answer
178 views
Cancel a cronjob or an automatically loaded process on OS X
I'm currently being bugged by Mail.app popping open every friday at the same time and simultaniously I receive mails from an app iBackup which I used to have installed.
I would like to get rid of it ...
1
vote
1answer
144 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:
...
0
votes
2answers
854 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
195 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
...
3
votes
2answers
2k 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
925 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
3k 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 ...
4
votes
2answers
1k 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
2answers
399 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
76 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?
2
votes
3answers
7k 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 ...
0
votes
2answers
844 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
660 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
401 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 ...
2
votes
2answers
4k 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
2k 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
46 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 ;-)
0
votes
0answers
717 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 ...
0
votes
2answers
2k 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 ...

