Cron is a job scheduler that allows users to run commands periodically.

learn more… | top users | synonyms (1)

8
votes
2answers
7k views

Bash Script on Startup? (Linux)

Is there any way to make/run a bash script on reboot (like in Debian/Ubuntu for instance, since thats what my 2 boxes at home have) Also, any recommended guides for doing cron jobs? I'm completely ...
12
votes
2answers
41k views

How can get a list of all scheduled cron jobs on my machine?

My sysadmin has set up a bunch of cron jobs on my machine. I'd like to know exactly what is scheduled for what time. How can I get that list?
3
votes
4answers
5k views

executing a sh script from the cron

I have a test.sh script #!/bin/sh php /home/v/file.php sh /root/x/some.sh when I execute the file as root from command line it works. sh /home/v/test.sh when I set it to crontab -e (is the root ...
1
vote
3answers
346 views

Cron with a 12-hour issue?

I have a cron job that's managed through plesk. I'm being told that it's being executed twice in a day, once at 5AM and once at 5PM, based on the email that's being received. Here's the cron line: ...
1
vote
2answers
786 views

using cron to run script

Hey guys, im trying to run a script using cron, im using a crontab created by the user ashtanga, in the crontab i have */5 * * * * /home/custom-django-projects/SiteMonitor/sender.py in top of the ...
3
votes
2answers
2k views

Add a one-off scheduled task through a shell script?

I'd like to execute a task at a given time, once. I know I can just use crontab -e to add it there, but I'd like to do that through a shellscript. crontab -e gives me some temporary file to edit ...
12
votes
3answers
11k views

Does RHEL execute all cronjob files under /etc/cron.d/*?

This is a RedHat Enterprise Linux 5 system (RHEL). We manage this system using Cfengine. We have several cronjobs which are running twice as often as usual. I checked the cronjobs under /etc/cron.d/ ...
2
votes
4answers
1k views

Anacron job complains “Gtk-WARNING **: cannot open display”

I'm trying to make a simple weekly Anacron job that backs up my computer if I click yes on the dialog. The script I wrote works fine if run manually, but when Anacron runs it, nothing happens and I ...
4
votes
1answer
70 views

When I schedule a command with 'at', can I change where the output is mailed to?

When I schedule a job/command with at to be executed in the future, the standard output and error of the command is "mailed" to the user that did the scheduling. So after my job runs, I get a message ...
7
votes
3answers
8k views

/etc/cron.daily/foo : Send email to a particular user instead of root?

I'm running CentOS 5.5. We have several cronjobs stored in /etc/cron.daily/ . We would like the email for some of these cronjobs to go to a particular email address, while the rest of the emails in ...
3
votes
2answers
396 views

I need help with a cronjob to watch for runaway processes and kill them

I have an interesting situation, I have a runaway ruby process - I know exactly how I trigger it. Point is, it got me thinking about runaway processes (CPU usage or memory usage). How would one ...
3
votes
1answer
3k views

How to have cron run a python script as root?

How can I get cron to run a python script as root? Here is my crontab file: 0 * * * * ./twitter/twitter.py Am I doing something wrong?
2
votes
1answer
183 views

Stop cron script from destroying my mirrorlist with invalid data

I have to following cron script that runs daily. As you should be able to see from the code, it outputs the results from reflector to /etc/pacman.d/mirrorlist. $ cat /etc/cron.daily/update-mirrorlist ...
3
votes
5answers
894 views

how to ensure a program is always running but without root access?

Currently I need to have a program running all the time, but when the server is rebooted I need to manually run the program. And sometimes I'm not available when that happens. I can't use a normal ...
2
votes
1answer
272 views

How does fcron knows whether the job was run?

I recently migrated from vixie-cron to fcron on my laptop. I have a question: how does fcron knows if a particular job was run in given period of time? As a file can change during running, what ...
9
votes
5answers
5k views

Run a script via cron every other week

I've done quite a bit of research in how to do this, and I see there's no direct way in cron to run a job, say, every other Thursday. Right now, I'm leaning toward making a script that will just run ...
2
votes
3answers
439 views

Weekly cron job to save list of installed packages

I am having trouble figuring out how to set up my first cron job. I simply want to run this command once every week: dpkg -l > ~/Dropbox/installed_packages My /etc/crontab file contains the line ...
29
votes
8answers
49k views

Where are cron errors logged?

If I setup cron jobs incorrectly they appear to silently fail. Where should I look for an error log to understand what went wrong?