Questions tagged [cron]

cron is a task scheduler based on clock time that runs on Linux-based machines.

915 questions
106
votes
8 answers

How can I view results of my cron jobs?

I see so many guides on how to run crontab, but what I need right now is to learn how to Find log files about cron jobs Configure what gets logged
Zombies
  • 3,972
99
votes
13 answers

How to make WSL run services at startup

After searching this site and various Q, it is clear that services and systemd is not available for WSL. I need to run a program in WSL every time I start my PC so I read this page on how to use crontab: How to run Ubuntu service on Windows (at…
seanbw
  • 1,143
89
votes
11 answers

How to stop a currently running cron job?

How can I stop a cron job which is currently running?
GURU KUMAR
83
votes
4 answers

How to run a cron job as a specific user?

I would like to run a cron job as a specific user on my machine. How may I specify the user for a cron job to run as?. The cron jobs will be running on a server (running on Ubuntu 10.0.4). The 'users' are users that have been created specifically…
morpheous
  • 4,463
80
votes
11 answers

How can I get a script to run every day on Mac OS X?

Cron? Launchd? iCal?? If so, how?
74
votes
7 answers

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?
igul222
  • 993
72
votes
2 answers

Set a cron every certain hours between certain hours

How can I set a cron to run every 2 hours between 8 am and 5 pm for example? Is this possible?
luqita
  • 841
66
votes
19 answers

Run a cron job on the first Monday of every month?

I'd like to run a job from cron at 8.30 on the first Monday of every month. The cron Wikipedia page says While normally the job is executed when the time/date specification fields all match the current time and date, there is one exception:…
Max Williams
  • 3,129
57
votes
2 answers

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?
jrdioko
  • 13,195
55
votes
1 answer

What is run-parts in /etc/crontab and how do I use it?

I have been digging through my Linux system to try and understand how it all works. In the /etc/crontab file I see the following: # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root…
nelaaro
  • 14,139
  • 30
  • 88
  • 115
46
votes
4 answers

Log of cron actions on OS X

Does the cron which comes with OS X log its actions anywhere? I'm not looking for output of any particular cron job, but rather log of what cron is doing. On a couple linux machines I've checked, there's /var/log/cron which has contents like: Apr…
Doug Harris
  • 28,397
40
votes
3 answers

What is the point of system-autodeath?

In a previous question I found a "system autodeath cron job" which would shut down my default network route daily. As I have never heard of such a thing before, I would like to know what it exactly it is and what purpose does it serve?
bobby
  • 553
39
votes
9 answers

Error adding cronjobs in Mac OS X Lion

Until now, I have never attempted adding a crontask on my Mac. To my surprise, it threw an error.. [hayek@mac:/www/] 02:33:22 PM: crontab -e 1…
Hayek
  • 2,085
36
votes
2 answers

Why doesn't my cron.d per minute job run?

I have thrown a bunch of darts trying to get a python script of mine to execute every minute. So I thought I'd simplify it to just do the "simplest thing that could could possibly work" once per minute (I'm running debian/testing). I created a…
36
votes
5 answers

How do I run a launchd command as root

I have the following launchctl command as a .plist file. It's loaded and set to run once a day but, it needs to run as root and I'm not sure how to verify this. Also, this cron job basically CDs into a directory and runs a command. I'm sure…
1
2 3
60 61