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
28 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
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 ...
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 ...
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 ...
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
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
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 ...
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 ...
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 ...
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") ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
3
votes
1answer
41 views

fault-tolerant crond replacement

I'm looking for a replacement to crond, or possibly an extension of it. The feature that I definitely would want to have is fault-tolerance. E.g. if a job failed to run due to the computer not being ...
1
vote
1answer
51 views

CentOS machine keeps “losing” active directory membership

All of our CentOS 6 machines have been joined to our active directory domain. Each of these machines eventually "loses" their domain membership, which breaks authentication for AD users. I created a ...
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 ...
5
votes
6answers
1k views

What does '>/dev/null 2>&1' mean in this article of crontab basics? [duplicate]

I am reading an article about crontab There is something about disabling automatically sending emails. Disable Email By default cron jobs sends an email to the user account executing the ...
0
votes
0answers
15 views

Shell script to monitor log files going over a certain size [duplicate]

Due to another issue I'm tracking down, one of my app servers occasionally starts generating a large amount of errors and then becomes unresponsive. For now, the simple solution is to restart the ...
0
votes
1answer
52 views

What does */13 do in a crontab?

*/n * * * * in a crontab means run every n minutes, if n divides 60 evenly. What happens for other cases, like */13 * * * *?
2
votes
0answers
31 views

Configure job to expire

I'm learning Linux at the moment and were doing some exercises scheduling jobs with cron and crontab, but I'm wondering if it's possible to limit the amount of times that the scheduled job is ran. ...
0
votes
2answers
91 views

Why does this Shell script fail as cron job [closed]

I have the following in a shell script, when I run this script it works but when I put this as a cron job it does not work(nothing happens!). How come? script #!/bin/bash ...
0
votes
1answer
53 views

Please help me to debug this notify-send battery alert script

I used crontab -e to define the following: */5 * * * * env DISPLAY=:0 /home/max/.bin/battery-check.sh The contents of the script are: #!/bin/bash ...
0
votes
1answer
304 views

Null message body; hope that's ok

I have the following command below as part of a cronjob. When I run the command via cron or at the command line, I get Null message body; hope that's ok. The contents of the email are empty but when ...
1
vote
0answers
56 views

How to do version-control repository update in crontab?

I'm trying to automate version-control repository update in crontab. The following script /home/usr/mrbean/bin/update.sh works in interactive Bash command-line: #!/bin/bash ...
0
votes
0answers
47 views

Configure cron for daily NMon task

I want to configure a cron job for NMon to gather stats during all day, everyday. Leaving a file per day to dump into NMon Analyser. I know the proper command to get a spreadsheet format its ...
0
votes
1answer
34 views

CRON path problems

I have a Python script that runs from the command line beautifully, but when I try and run it from CRON does strange things. The script generates, then runs an apk script file. The apk script file ...