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

learn more… | top users | synonyms (1)

1
vote
1answer
16 views

how to temporarily disable a user's cronjobs?

How do I temporarily disable one or more users' cron jobs? In particular, I do not want to suspend the user's cron rights - merely not fire any of their jobs. I am on SLES 11 SP2 and SP3 systems
0
votes
1answer
16 views

Having problem with mysql dbdump when password starts with special character

I am trying to take a db backup with a php file that is running from a cronjob. It was running fine when I tested with sample db. But when I used the actual db there was an error. I am using ...
0
votes
1answer
19 views

cron: output of a script?

I've got a cronjob that looks like this 0 0 * * 7 [ $(date +\%d) -le 07 ] && /home/archiver/archiver.sh &> /home/archiver/output And it works from the cron+bash perspective in that ...
0
votes
0answers
18 views

Using a custom script for cron jobs mail notification

After coming across Mailgun I would like to write my own script to use their API in order to send mail notifications from cron jobs — avoiding in this manner having to worry about installing a ...
0
votes
1answer
31 views

Add cron job via single command [duplicate]

First of all, I'm using elementary OS (based on Ubuntu 12.04). I have a cron job set up to run a script every day at 23:30: 30 23 * * * /path_to_script/ Is there a way to add it to cron via a ...
-3
votes
0answers
33 views

To change the output file name of the cron

I am using below cron to generate the logfile with name syntax as "AS_XYZMSCa_VLR DUMP_20150213" I wanted the output file with name syntax as "AS_MSCa_VLR DUMP_20150213" X,Y,Z,a - variables #! ...
0
votes
1answer
33 views

User cannot access crontab

Oracle Linux 5.10 Root user can access crontrab, but not any other user. There is no /etc/cron.allow and the /etc/cron.deny is an empty file. Using Oracle user account: [oracle@dub-ImrORA2 ~]$ ...
1
vote
1answer
38 views

Why scripts run as user but not as a cron?

I have a script that checks to see if port 4000 is open and listening, if it is return true, else start a service that also outputs a logfile. The script runs fine if I execute it as a user, but if I ...
0
votes
0answers
9 views

Pngquant does not run in Crontab

I have created a small script to compress all the images using pngquant. The script is as follows: #!/bin/bash find /home/ghosthut/wp-content/uploads -mtime -2 -iname '*.png' -print0 | xargs -0 ...
1
vote
2answers
28 views

I would like to delete entire archive log except retain last generated archive log

I want to delete all the archivelog, But retain last generated archive log alone. Currently I am using following which will delete entire/all the archive log and clear the directory itself. find . ...
-2
votes
2answers
38 views

Not able to run shell script using cron [closed]

I have a shell script test.sh in /home/username The test.sh file contains the following lines - #!/bin/sh cd /home/username/bin sh launch.sh ParameterName #launch.sh is in /home/username/bin ...
0
votes
1answer
51 views

Cronjob schedule

I have a task which I wanted it to run on every hour 56 minutes not sure which I should do below and what does "*/number" means. An example :- 12:56PM, 01:56PM, 02:56PM ... Use this ? */56 * * * * ...
1
vote
1answer
20 views

Why does apt-get remove leave package-installed cron files lying around?

Is there a good reason why apt-get remove leaves installed cron files in place where an apt-get purge or apt-get remove --purge is actually required to completely remove them? Example files may be: ...
-2
votes
3answers
45 views

CronTab is not working in Ubuntu for image compression job [duplicate]

I am trying to set up a cronjob to execute the following script. The function of the script is to find and compress png and jpg files in a WordPress directory. #!/bin/bash echo `date` >> ...
2
votes
2answers
63 views

Why is cron ignoring a / (forward slash) interval?

I want to set up a job to run every 15 minutes, starting at the 5th minute. This is my crontab line: 5/15 * * * * /root/job.sh >> /root/job.log But it only runs once an hour, on the fifth ...
0
votes
1answer
28 views

Is there any way to maintain counts in crontab?

Need to keep a track of the succeded jobs, on daily basis, with jobs ranging from /10 /20 minutes to twice/thrice a day, least for these every 10/20 minutes runs, I'd be interested to know if there ...
1
vote
0answers
37 views

What does CRON=1 do?

What does setting CRON=1 do when set in front of a command? CRON=1 ./foobar.sh I suspect that the cron environment variable does something for printing to standard out. But I can't find anything ...
2
votes
0answers
38 views

Display cron job times in a human-friendly format

Is there a way to display or is there a tool that can parse a crontab expression and display it in a human-friendly way? 10 6 * * * sh /usr/local/crons/file_check.sh For example, for the above cron ...
3
votes
1answer
44 views

How can I run Cron job every 5 days

I have 5 shell scripts, I want to run them in 5 days cycle, like follows: Day 1 : script 1 Day 2 : script 2 Day 3 : script 3 Day 4 : script 4 Day 5 : script 5 Day 6 : script 1 ...
1
vote
0answers
176 views

mail: cannot send message: process exited with a non-zero status

I've had a cronjob working for about a fortnight without any problems. Then last night I checked I didn't get the email that I usually get. I went to the terminal to try send myself an email, I got ...
1
vote
3answers
123 views

BashScript works from Terminal but not from CronTab

I've got a bunch of CronJobs, and they work fine, except for one. I've looked through a lot of forums and websites, and tried a combination of things but alas nothing has worked. Rephrasing the ...
0
votes
1answer
41 views

cronjob bash script called within another shell script not working

I have a shell script which calls a bash script within it. when I run this shell script manually it works fine however when I schedule this thru cronjob, the bash script is not doing the intended job. ...
0
votes
1answer
50 views

auto restart apache when high load average

My server always shut down when it reach a high load average. I have optimized my apache, mysql. but i cannot prevent sometime in a heavy traffic. So I try to write some shell to control load average. ...
0
votes
1answer
41 views

Entries in /etc/crontab not getting called in Centos 6.x

I created a dummy entry in /etc/crontab, but it doesn't get executed according to the cron log: /var/log/cron: Feb 7 08:20:01 localhost CROND[22781]: (root) CMD (/usr/lib64/sa/sa1 1 1) Feb 7 ...
0
votes
1answer
72 views

command to clean up old log files

I was trying to automate some auto cleaning of my Ubuntu System, with Cron Jobs I tryed to simplify this: sudo find /var/log -type f -name "*.1.gz" -delete sudo find /var/log -type f -name "*.2.gz" ...
0
votes
1answer
31 views

What does `line 19: 12364 Killed` mean in crontab error message?

I got a daily crontab task: 50 1 * * * sh /my_path/daily_task.sh > /tmp/zen_log 2>&1 This daily_task shell script will run some python scripts and produce a data file. And it fails for ...
1
vote
1answer
20 views

Prevent empty rsync email on cron

I have a crontab job to sync a folder: 50 5 * * * /home/user/bin/sync-folder This will execute an script: #!/bin/bash sudo rsync -rav --delete --log-file=/tmp/rsync-output /origin /destination ...
3
votes
2answers
165 views

Run crontab only if condition

I have a bash script that emails me whenever a web server is not responding, and the script is ran by cron every 5 minutes. However, if the website goes down for a few hours, I'd receive too many ...
2
votes
2answers
46 views

Find and rm command not obeying exclude list occassionally

I am running a find and rm -rf directory list modified earlier than 7 days with an exclusion list of directories which should not be deleted at any case. This is the script excerpt find ...
0
votes
0answers
36 views

Issue with a script launching URL, then pkill firefox after X seconds with cron job

I am trying to create a shell script that will start firefox on a certain URL, then kill it 120s later. I have a script that mostly works and a bad crontab job that doesnt seem to. testscript.sh: ...
1
vote
1answer
51 views

Crontab only for 24 hours, but every 4 hours

How can I run a crontab for every 4 hours where I download a file from a certain given link but only for 24 hours, starting at midnight? And put the 8 file content in a new file?
1
vote
3answers
69 views

Cronjob doesn't execute shell script, but when I am executing it standalone it works. Why?

Shell Type: >echo $SHELL /bin/ksh Cronjob : 15 * * * * /bin/ksh /wls_domains/resMGT/logs/bea/wlr3queuetransaction.sh > /wls_domains/resMGT/logs/bea/data/script.log The script is as below: ...
1
vote
1answer
29 views

Is there a good reason to prevent users from using cron/at?

At work on our linux servers, I have a standard non root account. Unfortunately the account does not have permissions to crontab or at. Is there a good reason to block these commands? I can write a ...
1
vote
2answers
102 views

Restarting OpenVPN on SELinux by a cronjob

I have a server with some OpenVPN instances (one server, several clients) running on Debian with enforcing SELinux. The connections to some of the VPN servers my machine is connecting to are somewhat ...
0
votes
1answer
43 views

Crontabbed shell script not able to create/write to a file

I have written a simple shell script to backup the tables in my DB using the mysqldump command. The command simply dumps the DB into a dbName.sql file. However, if the dbName.sql file doesn't already ...
0
votes
2answers
30 views

How to automaticly open a URL at specific times each day

I am using kubuntu 14.04. I have installed cron using sudo apt-get install cron, and then I created this file in IDLE, called openurl.py. #!/usr/bin/env python import webbrowser ...
1
vote
0answers
52 views

init.d script ignored in yocto based distro

I'm modifying an embedded distro that is built using the yocto project. I need to add cron to it and have the cron daemon start on startup. I have created the symlink /etc/rc5.d/S98cronstart that ...
2
votes
1answer
38 views

Time remaining for the next run

I need to calculate the time remaining for the next run of a specific job in my Cron Schedule, I've a Cron with jobs having frequencies of per hour, thrice a day etc, no jobs running on specific ...
1
vote
2answers
65 views

Databases backup with cron

I'm trying to set up a cron job in order to backup my databases daily. Here's what I wrote in my crontab file : 25 18 * * * root mysqldump -u root -p myPassWord --all-databases | gzip > ...
0
votes
2answers
38 views

Turn off mail notification in terminal

I'm running some cron jobs on my machine and every time I fire up a terminal session I'm getting a 'You have mail' message (the job produces output on success which gets mailed to me). Any way to ...
0
votes
2answers
43 views

Cron Job Not Running

Oracle Linux 5.10 I can manually run the script "tblspc_usage.sh" successfully as the oracle user. I know this because it emails me a report. But it not run at all from cron. It doesn't generate a ...
0
votes
2answers
42 views

My script is reported as executing at the CRON log, but it is not listed at any user's crontab

This is the CRON log case computer that runs some scripts (internet-connections oriented): luis@Fostrot:~$ sudo tail -n 50 /var/log/syslog | grep "cron" -i Jan 19 21:30:01 Fostrot ...
1
vote
0answers
36 views

Cron job running at 12.00 AM despite changing its time

I have only one cron configured in cPanel for WHMCS to run once per day at 12.00 AM. The cron sends daily activity logs to my email. A problem came up recently in which cron job activity logs sent ...
0
votes
1answer
69 views

Cron job, random start but within timeframe

I want a script to run once a day, everyday, starting any time between 0900 and 1200. I'm not completely sure about the dash syntax - does it mean that the script will run EVERY hour between 9-12, or ...
1
vote
1answer
91 views

How to restart my java program automatically if it gets killed?

I am running my runnable jar in linux machine (machineA) as shown below. In the runnable Jar, I have a java program which sends email to me every 15 mniutes. ...
-1
votes
2answers
51 views

Shell script issue when added to cron

I have written a shell script in order to monitor Nagios service status continuously (See this question), which is as follows: #!/bin/bash RCPT="abc@xyz.com" service nagios status | grep [0-9] if ...
1
vote
1answer
77 views

Keeping track of service status continuously

I need to monitor the status of nagios service (Because, whenever I make any changes in configuration and apply the new configuration, I would find nagios service stopped). If found in 'stopped' ...
3
votes
0answers
42 views

How do I schedule a cron task to run

I'm looking to crontab a script every hour starting Friday at 5pm... ending Monday at 5am. This script checks if it's completed this week and if it's currently running. If no/no, start task. Off the ...
1
vote
1answer
47 views

SQLPLUS value in variable- not working from crontab

I am trying to store sqlplus value to a variable in Linux. Script is working fine when triggered manually. But value in variable is not stored when the script is called from crontab. Code: ...
0
votes
0answers
57 views

Why isn't my etc/cron.d file executing?

*/5 * * * * root ruby /opt/redmine/extra/svn/reposman.rb --redmine-host http://tracker.intranet.****.com.ar --scm Mercurial --svn-dir /opt/repos/hg --command "hg init" --owner www-data --url ...