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

learn more… | top users | synonyms (1)

0
votes
1answer
11 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
11 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
29 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
37 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
22 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
23 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 ...
1
vote
1answer
1k 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 ...
0
votes
2answers
25 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
1answer
50 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' ...
0
votes
1answer
15 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
0answers
23 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 ...
1
vote
1answer
42 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
37 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
28 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: ...
3
votes
0answers
28 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 ...
15
votes
3answers
10k views

How can I tell cron to run a command every other day (odd/even)

When configuring cron to run a command every other day using the "Day of Month" field, like so: 1 22 */2 * * COMMAND it runs every time the day of month is odd: 1,3,5,7,9 and so on. How can I ...
0
votes
0answers
28 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 ...
-2
votes
1answer
19 views

'Is a directory' while trying to pass to destination directory

I've been trying to get my script to work from a cron job so that I can automate a backup of my /home directory, but unfortunately when I run with run-parts to test if the script will work I keep ...
3
votes
2answers
576 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 ...
37
votes
4answers
29k views

What is the 'working directory' when cron executes a job

I have a script that works when I run it from the command line, but when I schedule it with cron I get errors that it cannot find files or commands. My questions is twofold: When I schedule a cron ...
2
votes
2answers
77 views

Why does my cronjob not execute my shell-script?

I have a crontab that creates a dump of my database every night: 20 3 * * * /path/to/dailydump.sh dailydump.sh contains: #!/bin/sh DATENAME=`date +%Y%m%d` ...
0
votes
1answer
24 views

Adding timestamp into log file via cronjob command [duplicate]

I try to run git pull command with loging output message to file every 5 minutes. But i got error like this, (root) CMD (cd /var/www/sites/ && git pull origin master | sed -e "s/^/$(date ...
5
votes
3answers
16k 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 ...
-4
votes
1answer
29 views

Run an application at each system boot in Arch Linux [duplicate]

I am using Arch Linux. I don't have any special permissions, I am just user without any special privileges. I want to start an application after each boot. I have already tried using crontab jobs, ...
4
votes
2answers
1k views

Have cron email output to MAILTO based on exit status

I have a cron job running a php command like this: php /path/to/script.php > dev/null This should send only STDERR output to the MAILTO address. From what I gather the php script is not ...
0
votes
1answer
28 views

Disable log of specified crontab item

How can i disable logging for specified item/line in crontab? (i´m on debian/raspbian) I have a script that checks if wlan0 is up every minute, but i don't like that cron logs every minute on syslog ...
1
vote
1answer
64 views

how to pass a password with a cron job safely?

I have a site map generator script placed in this URL http://www.mydomain.com/admin/sitemapgen/ However this URL is protected with an username and a password in auth_type basic method. I need to ...
0
votes
0answers
28 views

terminal linux calendar specify used calendar file

I´m playing around with linux calendar My aim is that all users can run a script which does nothing more than adding a givven argument in 10 days as cal item // called like this: reminder "Meeting ...
0
votes
1answer
383 views

how to automatically cleanup failed PHP uploads in /tmp?

How can I automatically cleanup failed uploads? PHP is storing them in /tmp and all file names look like phpAbCDeF (basically php followed by 6 characters). I know that I can use the command: find ...
0
votes
1answer
36 views

Running smsd gnokii on boot

I can successfully run smsd but I could not run it on boot. I tried using rc.local and @reboot cronjob but none of the two worked. Does anyone tried to successfully run the script on boot?
0
votes
1answer
92 views

Where to find the Crontab logs in CentOS

First of all I'm using CentOS [root@a etc]# cat system-release CentOS release 6.5 (Final) [root@a cron.daily]# ps -ef | grep cron root 982 1 0 Jun14 ? 00:01:15 crond root ...
0
votes
1answer
537 views

CRON job to check if PHP script is running

I am having trouble regarding CRON jobs, I've basically got two php scripts that I want to keep running continuously on my server. Currently I am using an infinte loop to keep them going but they seem ...
2
votes
0answers
31 views

Strange cron behaviour

I have a script that reads a list of IPs from a file, compares with the existing ones in a chain, and adds recently added IPs in the file into that chain. Running the script manually (e.g., ./script) ...
1
vote
0answers
23 views

Can I change the exclude file list while running rsync under a cron job

I am using Fedora 20, MATE desktop, zshell. I have started a cronjob to run, every evening, an incremental backup using rsync, closely following the suggestions here. After the first run yesterday, ...
1
vote
1answer
20 views

Switching shells for one cron job

Say I have the following in my crontab: * * * * * command1 -option A; command2; command3; etc. I would like cron to run the commands I have in that line with a specific shell. How can I do that? ...
1
vote
1answer
24 views

Get chronological list of dates & times for scheduled tasks in cron

Given a job specification in crontab, is there any way to get the list of dates and times the job in cron will run in the next week? For example, given a string 10 13 * * *, is there any way to get ...
16
votes
6answers
40k views

Why did my crontab not trigger?

I used crontab -e to add the following line to my crontab: * * * * * echo hi >> /home/myusername/test Yet, I don't see that the test file is written to. Is this a permission problem, or is ...
0
votes
1answer
34 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
49 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
103 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
17 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
30 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
65 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
1k 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
38 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
30 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
47 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
341 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
25 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 ...
1
vote
0answers
20 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. ...