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

learn more… | top users | synonyms (1)

2
votes
1answer
157 views

systemd - Timer units that mimic anacron behaviour

I need to write a timer unit for a machine which is turned of frequently (e.g. classical desktop setup). This timer unit needs to be activated regularly but not very often (e.g. weekly, monthly). I ...
2
votes
2answers
1k views

What are the permissions of a cron job?

When a cron job runs with what privilege does it execute? I'm not sure about that. Is it with the same privileges of the user that added it via crontab -e?
2
votes
1answer
1k views

Cron daemon error : Permission Denied

I am having trouble setting up a cron job. My set up is as follows: crontab -e */10 * * * * OTP_ProJect/PandaServerInfo/SVN/PandaQueueMonitoring/trunk/submit_cron_test.sh the shell script has ...
2
votes
1answer
250 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 ...
2
votes
0answers
24 views

Solaris cron ignoring mail aliases?

As a Solaris user, I want cron jobs generated emails for the localuser@server to be forwarded to my myuser@sample.com email account, so that I read only one inbox. To resolve this I have forwarded ...
2
votes
1answer
202 views

bash script - supervisor program

I have to write a shell-script that have to do the following tasks: -in every 5 seconds it saves:     -how many users are using joe and/or vi;     -if ...
2
votes
2answers
199 views

Strange crontab-script interaction (bash)

I'm running Ubuntu 12.04 and bash. I've written a pair of shell scripts that allow me to set an alarm which, after ringing, unsets itself. The first, alarmset, allows me to enter a time and modifies ...
2
votes
0answers
85 views

Use dedicated per-user log file for cron and?

On Ubuntu 12.04 how can I configure cron to log to a particular file when it runs jobs as a particular user? I am interested in redirecting both the messages that go into auth.log and those going into ...
2
votes
1answer
320 views

How do I push a Mercurial repository to BitBucket over ssh?

I created a public key for ssh and registered that key with BitBucket. I then attempted to push: $ hg push ssh://jhayward@bitbucket.org/johncharrell/[project name] pushing to ...
2
votes
1answer
258 views

Cron & Gnu Screen - Trouble with detached screen [duplicate]

Possible Duplicate: sending text input to a detached screen I have a script for my Minecraft server that runs automatically every 15 minutes. The problem is that after a server reboot, ...
2
votes
1answer
72 views

Cron does not execute xinit command

I have a command that works perfectly when launched from the prompt: xinit /home/user/myscript.sh -- /usr/bin/Xvfb :1 -screen 0 1x1x8 But is not executed when put in crontab: @reboot xinit ...
2
votes
2answers
177 views

Why are new cronjobs ignored unless crond is restarted in SLES?

I added a new cronjob with a user (SUSE LINUX Enterprise Server 9.4): # su - XXX $ crontab -e and this is what I added: * * * * * echo `date` >> /home/XXX/a.txt but the a.txt isn't ...
1
vote
4answers
1k views

Crontab not working

I'm trying execute a basic shutdown crontab to run M-F at 10PM. So I did the following: sudo crontab -e Once inside of the crontab I added the following line: 0 22 * * 1-5 shutdown now The job ...
1
vote
3answers
67 views

dpkg-reconfigure: not found when running in cron

I have a virtual server (debian) and the clock fails to sync from time to time (probably because i save/restore state with vboxheadlesstray). To fix this issue I run dpkg-reconfigure ntp && ...
1
vote
2answers
254 views

Is it possible to have a cron job run more frequently than once every minute?

CentOS 6 I have a shell script that performs a task every minute. The task itself only takes a couple seconds to complete and ideally I'd like to have this shell script execute 2-3 times per ...
1
vote
3answers
825 views

Why can't cron job find basic Linux commands?

I'm trying to set up a cron job to run a PHP script daily as part of a web-based booking system. It's been running perfectly for several years on a different Apache server using this in the crontab: ...
1
vote
2answers
633 views

CentOS, PHP file is running from browser, not from cron daemon

I am working on CentOS. I have created a PHP file which run from browser http://mydomain.com/backupfile/dobackup.php I have added the script from crontab and made the file executable, but it is ...
1
vote
3answers
451 views

Why does Crontab give me an error with my PHP script when running it from the terminal does not?

I'm having some problems with running the Crontab with PHP files. I have this same php scripts running in the Crontab for more than 6 months but some days ago mysteriously they stopped to execute the ...
1
vote
3answers
315 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
94 views

Third cron field doesn't seem to work (job runs when I don't want it to)

I scheduled a job like this: * * 6-8 * 1-5 echo "test" >>/tmp/test.log 2>&1 I expect this job to run only on 6th,7th,8th, these 3 days. but today is 18th, it still runs. What ...
1
vote
2answers
176 views

How come crontab -e is different from less /etc/crontab?

Im pretty new to unix and crons, I was currently about to try to add crons to an existing cron file. I read you could do this with crontab -e. The confusing thing to me is just that crontab -e shows ...
1
vote
2answers
159 views

Run a cron job every minute, meaning of syntax [duplicate]

I read somewhere that you can add a cron job to run every minute like this: #min hour day month weekday command */1 * * * * <your command> What does the /1 part mean? Can I ...
1
vote
1answer
73 views

Cron job doesn't seem to be executing in ubuntu

I have a script located /myscript/script.sh and I have a cronjob that I submitted like this: sudo crontab -e The contents of the crontab are as follows: */1 * * * * ./myscript/script.sh The ...
1
vote
2answers
693 views

Can a crontab job run concurrently with itself?

If I have a crontab job that runs, for instance, every hour, but that job may take more than an hour to complete, will the next job fail to run?
1
vote
2answers
1k views

Python script to shutdown system doesn't work in cron

A python script to shutdown system works fine from the terminal but doesn't work when included in crontab. The script is called by cron but ends with an error 'shutdown command not found'or 'init 0 ...
1
vote
1answer
291 views

How to update MOTD regularly?

Every week there's a new work log/to-do list at work. There's a todo script which can be used to extract my own to-do items from that. Currently this is called in ~/.bash_aliases_local, which is ...
1
vote
1answer
53 views

Why does redirection in crontab result in a zero byte file?

System: Xubuntu 13.10 When I have this crontab entry */5 * * * * cat /home/dbk/.bash_aliases &> /home/dbk/Desktop/junk junk has a byte size of 0. Running $ cat /home/dbk/.bash_aliases ...
1
vote
1answer
102 views

Why do I get different outputs when running my shellscript manually from when I run it with cron? [duplicate]

I have a fairly simple shell script (foo.sh) that looks like this: #!/bin/bash echo -n "$USER,$(date)," `binary -flags | sed -e '1,30d'`; exit 0; This script is supposed to prepare some output ...
1
vote
1answer
389 views

set up local mail delivery to user from cron script

A line in my cron.daily script not work as expected. I haven't any special smtp mail server in system, this line rsync -avun --inplace /oneuser/file.xls /otheruser/file.xls| mail -s "$0 $?" ...
1
vote
1answer
1k views

Run gui application on startup

I can run a script at boot by adding the following line to my crontab: @reboot perl /path/script That works fine. But the problem arises when I try to run a gui application such as gmail notify. It ...
1
vote
1answer
1k views

Cron: My crontabs don't seem to be doing anything at all

I think I'm missing something. I've set up some crontabs to handle rsyncs over ssh in my office to handle some backups, but they don't seem to be running OR logging, for that matter. Am I missing ...
1
vote
1answer
37 views

Cron task in graphic interface

I need to open one (or more) browser tab periodically and I decided to use cron. The command in the shell (bash) that correctly executes this task is chromium-browser http://mysite.com. If I type it, ...
1
vote
1answer
30 views

As root, how can I list the crontabs for all users?

I have a script being run automatically that I can't find in the crontab for the expected users, so I'd like to search all users' crontabs for it. Essentially I want to run a crontab -l for all ...
1
vote
3answers
41 views

variables in crontab [duplicate]

On our linux server we have a lot of entries. Many entries look like this: 15 13 * * 3 /very/long/path/to/binary/run.sh ... These entries would be easier to maintain if I could write: 15 13 * * ...
1
vote
1answer
47 views

Help with “crontab -e” [duplicate]

I'm trying to learn a little about cron and would appreciate some help. I edited crontab -e to have this line: */10 * * * * /usr/bin/touch /home/dkb/Desktop/test.txt It works and I see ...
1
vote
1answer
31 views

Is it possible to use the at command to schedule a job to run at a given timestamp?

I want to schedule a file to run using the at command, as described in this tutorial. I see that the at command supports the posix format -- but I don't see any mention of timestamps. Surely it is ...
1
vote
1answer
110 views

What does /etc/cron.daily/apt do?

Could someone explain what the apt script is doing in cron.daily please? I can't find any documentation on it. NOTE: I'm trying to investigate a server-server communications issue which frequently ...
1
vote
1answer
111 views

Launch 2 celery processes via cron

I'm trying to chain some commands to periodically check/launch two processes via cron (I'm on a shared host, can't change things around). After a lot of googling around, all the things I've done don't ...
1
vote
2answers
46 views

When will this cron run

Cron: * */6 * * * /path/to/command I want this cron to run once in every 6 hour. Whats wrong with the above cron definition, and why?
1
vote
2answers
93 views

Cron creates vim process but does not display vim

Under MacOSX 10.8.2 I am able to run vim as follows in the bash shell: /usr/bin/vim -c "normal G" -c 'startinsert' ~/.journal If I put the exact same command in a script: #! /bin/bash export ...
1
vote
2answers
1k views

how do I run a cron job with a specific user?

My cron and scripting skills are very poor, but I need to run a job every 5 minutes by user 'cpc'. So I created a script and left it at /root. My crontab -e entry about it is: 0-59/5 * * * * ...
1
vote
2answers
2k views

Watchdog script to keep an application running

I currently use an application called MxEasy on my linux servers to display video from a couple of IP cameras. The software is rather buggy and crashes occasionally. I've wrote a script that checks to ...
1
vote
1answer
150 views

crontab sets up user variable, redirect output, and detect connetcted network

I have three problem, all of them are about crontab. Can I access $HOME variable in crontab ? for example, use $HOME like this: PATH=$HOME/bin:$HOME/scripts:$PATH ? or * * * * * echo "test" > ...
1
vote
1answer
393 views

Crontab with SVN and Git

I have some repos which are both in SVN and Git. My username is guyfawkes, and in my home directory I have folder www which contains all my repos. In this directory I also have file update.sh: ...
1
vote
2answers
367 views

How do I run a program only once per day, while accounting for variable uptime and possible failure of program?

I need to run a command once, but only once, per day, until it succeeds. Continuous uptime cannot be expected, and program success cannot be guaranteed. This program requires network access, but not ...
1
vote
1answer
960 views

Trying to create a cron to Rsync then tar the folder

I'm stuck at the first hurdle! I want to run a couple of commands from a bash script. First something like this to rsync some directories: rsync -e ssh -az user-whatever@website.com:/home ...
1
vote
2answers
579 views

Start and monitor process with CRON

There is a stub application written in C. Now I want to run this application periodically, say at 11.30am daily. I thought of using the cron process but I don't know how to do it. Please help. Also ...
1
vote
1answer
21 views

automate updates with a bash script and cron

I'm trying to automatize the updates of debian system, without making upgrades. Then i'll send an e-mail to me, everytime there is an upgrade available. I've tryied to do it with cron-apt, but i ...
1
vote
1answer
29 views

Use /etc/init.d/fetchmail with the personnal ~/.fetchmailrc

Now, I have two users in my system using fetchmail with a personal ~/.fetchmailrc and syncing there mails with the command fetchmail -kv --uidl -m '\''/usr/bin/procmail -d %T'\ (In a cron but this ...
1
vote
2answers
70 views

Script from cron doesn't create archive

I'm using: # cat /etc/redhat-release CentOS release 6.4 (Final) Have an script in user's crontab: $ crontab -l 0 7 * * * /home/teamcity/scripts/TC_backup.sh If I run this script under this very ...