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

learn more… | top users | synonyms (1)

0
votes
1answer
11 views

Where is NMon cron job for AIX?

While trying to know where is NMon job configured to run; I do find that it's NOT listed on Crontab (using crontab -l). BUT - the job is currently running as expected, which is weird. See the ...
0
votes
2answers
27 views

bash script cronjob not working

Why is the cronjob below not working? As manually executed script is working, but if I put it on cron job it doesn't push through. #--------Reports------------- 25 11 * * * ...
0
votes
0answers
23 views

Issue running Python script via cron inside Docker

I have an official Ubuntu 14.04.1 container running via Docker. cron is working fine, I added * * * * * /bin/echo "working" >> /test to my crontab using crontab -e and then I started cron with ...
0
votes
1answer
13 views

SASL authentication fails when called from crontab

When I run mbsync from the command line it works fine. But if mbsync is run from the crontab, mbsync fails with this error "Error: SASL(-1): generic failure:". My guess is that mbsync's SASL ...
0
votes
1answer
19 views

How do I suppress all email notification from cron for particular job?

I am scheduling the following shell script #!/bin/bash (echo open mailserver.nowhere.local 25; sleep 1; echo EHLO; echo quit)\ | telnet | grep "?Invalid command" if [ $? -eq 1 ]; then ...
1
vote
2answers
43 views

Cron several script every 5 minutes with 10 second between each script

I have several file setup in my crontab, all those scripts must run every 5 minutes. The problem comes when those script need to much CPU and IO at a time and the machine become unavailable. To ...
2
votes
2answers
986 views

Need help with a script to test for memory usage [closed]

I'm trying to put up a temporary band-aid while I work out a solution for a app's memory leak. What I wrote was a small bash script that I put in the root on the server. This is what the script is ...
2
votes
1answer
35 views

How to suspend a process for a certain period of time?

I have several running processes which is started by a shell, but I don't want them to run during 08:00am - 20:00pm for each day because they are really bandwidth-consuming, so , I have to suspend ...
1
vote
0answers
21 views

Logrotate or scripting to manipulate log file

I want to make sure that a certain log file gets empty when it reaches a specific size. I first used logrotate since the man page says: It will not modify a log multiple times in one day unless ...
1
vote
1answer
38 views

In crontab, @reboot is working but regular not working

I am studying linux on my raspberry pi that installed debian version. There were no problem, worked perfectly in crontab, but something has occured. @reboot sudo bash /home/pi/IP_check.sh */10 ...
2
votes
2answers
330 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 ...
1
vote
1answer
23 views

Killing a process with cron as soon as it starts

I want to stop dropbox from running as soon as I log into my account. Now I know I could do this simply by going to Startup Applications and disabling dropbox. But I was wondering if there is a ...
-2
votes
0answers
51 views

How to recover my source code that is removed by stupid CentOS automatically?

I have no backup, and my server scripts are running as production, but unfortunately CentOS removed my all files stored in /var/tmp Now my source codes are lost, but still its running as below, how ...
4
votes
3answers
13k views

How do I find out why cron is not running my jobs?

I'm using Ubuntu 14.04, and the cron daemon is running: # ps ax | grep cron 822 ? Ss 0:00 cron but it is not executing any jobs. I was previously getting entries in /var/log/syslog such ...
1
vote
0answers
16 views

How to monitor the integrity of a script that is running?

I want to make sure a running python script was not modified accidentally by some other process (or cosmic ray, or unexpected developer update). I've heard of comparing a checksum of the script (e.g. ...
1
vote
2answers
19 views

Changing user's wallpaper via system crontab

I tried to set up wallpaper change via cron in /etc/crontab, but I failed. DISPLAY env set directly / before cmd, but still it's not working: DISPLAY=:0.0 * * * * * ad env DISPLAY=:0.0 ...
1
vote
0answers
16 views

How to set one job to run at precise time with anacron without losing config at next upgrade?

I want logrotate to run at a precise time daily. Currently it is set to run at some random time using anacron and I don't want to change the randomness factor for all the other jobs. I have ...
0
votes
0answers
22 views

How to know the which jobs are scheduled in cron for today

I am looking to get the details of jobs which are scheduled to run from cron for today and need to make it as a script by 12AM every day to get the job details that are scheduled for today and like ...
2
votes
2answers
27 views

change the name for root mails from cron

I have two servers that are synchronized with rsync, one is the failover server of the other, so they both have the same name. Now root mails that are sent to my other account are all named from root ...
1
vote
1answer
165 views

How to run a cron job to execute every minute?

I am trying to create a directory having timestamp in its in name in /home directory. I have created following cron job as root user. But it's not running. What's wrong I am doing? Following is my ...
4
votes
2answers
9k views

Cron job to delete files older than 3 days

I need to remove files older than 3 days with a cron job in 3 different directories. (these 3 directories are children of a parent directory /a/b/c/1 & /a/b/c/2 & /a/b/c/3) Can this be done ...
0
votes
0answers
7 views

Why does rbenv not get added to the path when bash -lc is called from a crontab job? [duplicate]

I'm trying to setup a cron job to back up a rails project using the whenever and backup gems. I have done a standard install of rbenv on Ubuntu to manage my rubies. In .bashrc export ...
0
votes
1answer
37 views

Shell script runs differently when schedulled with cron

I have a strange problem with my backup script. To begin with, this is the backup script: ########################################################### # CODE BEGINS HERE ...
4
votes
3answers
18k views

How to start a cron job without reboot?

I use a cron job to call offlineimap every 2 minutes: */2 * * * * /usr/bin/offlineimap > ~/Maildir/offlineimap.log 2>&1 I needed to kill the cron job to fix a problem. How can I then ...
2
votes
0answers
16 views

Remove tar compress spool from cron email

I have a crontab job that call a simple script to backup a website: 15 0 1,10,20 * * /home/username/bin/backup_whatever This is the script: #!/bin/bash TODAY=$(date +"%Y%m%d") ...
3
votes
2answers
549 views

Use /etc/aliases for outgoing mail relayed by postfix with local domain

I'm using Ubuntu 12.04 with postfix configured as satellite system that relays outgoing mail to Gmail. For sake of example, my registered domain is example.com I want root cronjobs' error output to be ...
1
vote
0answers
67 views

Maintain screen session when executing shell script on boot

Solved: I solved this problem by introducing a delay before executing the script: @reboot sleep 60; /root/start_server.sh On Ubuntu 14.04, I have a crontab entry set to run on reboot: @reboot ...
0
votes
1answer
26 views

Edited /etc/cron.d/anacron, changes are immediately in effect?

After editing /etc/cron.d/anacron and saving the file, are the changes immediately acknowledged by cron? Or do I need to run a command to tell cron to reload /etc/cron.d/anacron?
0
votes
1answer
19 views

Scope of shopt options in cron script

I have a bash script that is run nightly in a cron job. It needs to do case insensitive file matching, so the script calls shopt -s nocaseglob I want to make sure this does not affect other cron ...
1
vote
0answers
47 views

Cron can't access my home directory when I'm logged out

I have quite a strange problem using cron. I distilled it thus far: I created following simple bash script in /home/user1/cron_dir/cron.sh: #!/bin/bash echo "Success" As user1 I created following ...
1
vote
0answers
8 views

start xscreensaver from cron@reboot, ubuntu startup, service/deamon?

I need start xscreensaver for ubuntu, and it can be started in ubuntu startup application. my question is: can xscreensaver be started in cron@reboot? can xscreensaver be started in service/deamon? ...
1
vote
1answer
35 views

run btrfs balance with cron

Since I run today in a problem with a full disk, which turns out is not unbalanced. Which you can fix with btrfs balance. So my question is: Is there any risk by ruining this by a cron job? (in ...
0
votes
1answer
32 views

Can someone be so kind as to setup a cronjob for me? [closed]

I've been trying to get cron to execute these two scripts to schedule and post on twitter, tumblr, facebook and linkedin. It worked once and never again. <?php require ...
2
votes
2answers
65 views

Cron job not behaving as expected

So I have a python script that pulls down git/svn/p4 repositories and does some writing to a database. I'm simply trying to automate the running of this script and based from what I see in syslog it ...
30
votes
15answers
4k views

Run unix command precisely at very short intervals WITHOUT accumulating time lag over time

Question I'd like to be able to run a UNIX command precisely every second over a long time period. I need a solution, which does not lag behind after a certain time, because of the time the command ...
3
votes
0answers
27 views

high precision subsecond cronjob replacement

I am looking for a cron replacement which could run subsecond schedule, is there have any "still alive" project which serve this purpose? Currently running Ubuntu 14
0
votes
1answer
47 views

crontab not executing my script?

I added this rule to the bottom of my crontab * * * * * /root/test.sh It basically resets iptables so I can fool around. If I mess up I won't be locked out of my box. When I run the script in bash ...
2
votes
2answers
41 views

Emulating /etc/cron.d/ on OSX

On most modern unixes, cron supports individual crontab files in /etc/cron.d, in which each task executes as a specified user. These files automatically update the crontab once edited. They allow ...
2
votes
1answer
78 views

Send backup by email with crontab

I use this cron job to do a backup of /home/blah/ each day at 01:00 a.m. : 0 1 * * * tar -zcf /home/blah/backup.tgz /home/blah/ In fact I would prefer that an email is sent to me with the .tgz file ...
15
votes
4answers
21k views

How do I completely silence a cronjob to /dev/null/?

On my Ubuntu-Desktop and on my debian-server I have a script which needs to be executed each minute (a script that calls the minute-tic of my space online browsergame). The problem is that on ...
1
vote
1answer
37 views

Are there disadvantages/consequences to adding scheduled tasks directly to /etc/crontab instead of using the crontab command? [duplicate]

CentOS 5.x I noticed that someone (presumably another admin) added an entry directly to the bottom of /etc/crontab so it reads like: SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root ...
1
vote
1answer
47 views

Cron job — If computer inactive for x minutes turn wifi off

I would like to have an alias command in my .bashrc that could be ran at startup. That states: If computer is inactive for X minutes then turn off wifi. How would I do that? I am currently using ...
4
votes
1answer
49 views

cronjob does not execute when not logged in

SOLVED, see 'useless' answer. I have a cronjob in my crontab. When I specify the job to be executed in 2minutes, I wait, and then I can see files created by the job, I can see the process with ps. ...
1
vote
1answer
57 views

How to restart my server automatically using crontab if they went down?

I have a jar file which I am running like this in my Ubuntu 10.10 and then it starts my exhibitor server in the background - nohup java \ -jar ...
0
votes
1answer
50 views

Crontab permission problem

I have a fc19 host at work. This morning crontab did not work. $ ls -l /usr/bin/crontab ----------. 1 root root 53472 Jun 11 2013 /usr/bin/crontab The permissions -------- means no one has access ...
0
votes
3answers
245 views

Lock folder when running cron

I am setting up my first cron on a Ubuntu Desktop system. I was curious to know if there is a way to lock a folder before a cron is ran and how to set it up? I am following this article. I am just ...
4
votes
1answer
687 views

Automatically detect when a file has reached a size limit

I would like to send an email when a file reach a certain size limit. The only way I thought of doing this is by doing a cronjob which will check the file size and send the email if the file is ...
1
vote
1answer
34 views

Cron Job Not working [closed]

I have been trying to create a cron job to execute a script located in ~/Documents/script.sh at midnight every night and every 8 hours after that. I have found a lot of material on this but for some ...
0
votes
2answers
52 views

Crontab does not work properly in Ubuntu

I am learning how to use cron. I wrote some simple code in my crontab # m h dom mon dow command */1 * * * * echo "1 minute"> ~/Document/cronoutput I expected it to print the words every ...
1
vote
1answer
77 views

How to execute recurring Bash script at specific times?

How would I set a script to execute on every Tuesday and Thursday at 11:50am? I've been looking at the at command, but I can't conceive how to use it the way I need to from its man page.