cron is a task scheduler based on clock time that runs on Linux-based machines.

learn more… | top users | synonyms

0
votes
1answer
11 views

btrfs won't run from cron

I'm trying to set up a cron job to create a btrfs subvolume snapshot of my root partition. The command works perfectly if I run it from the command line, but nothing happens at the scheduled cron ...
0
votes
1answer
2k views

Running Cronjobs as per Local Time rather than Universal Time

On running dpkg-reconfigure tzdata in terminal and i get 2 different time on my machine Local time is now: Wed May 1 11:58:55 IST 2013. Universal Time is now: Wed May 1 06:28:55 UTC 2013. ...
0
votes
1answer
328 views

Crontab No such file directory

I'm trying to run an hourly python script. My crontab looks like this: crontab -l 0 * * * * "/common/.../www/concat.py /common/.../www" as an output I get this: /bin/sh: /common/.../www/concat.py ...
0
votes
0answers
11 views

How to run browser in background in Ubuntu

I am using Ubuntu 14.04, and PHP. I have 2 files: test.html - content java to test network update.php - the test file will post result to update database. I need to run and execute an URL address ...
35
votes
8answers
65k views

Run a command every week with Cron?

Simple question- what would a crontab entry look like for a command I want to run every week on Saturday at 8:05 AM?
0
votes
1answer
34 views

DD-WRT Additional Cron Jobs aren't running

I have installed DD-WRT (v24-sp2 (06/23/14) std - build 24461) on a TP-Link TL-WR841ND v9 and I'm trying to add a CRON job to update my Unlocator IP configuration as described here: How to set up a ...
0
votes
2answers
43 views

crontab is not working

I am using Linux Fedora. I want to create a crontab with SCP command, but it's not working. [shiv@db2 ~]$ crontab -l #this is server to server copy... */2 * * * * date >> ~/$ scp ...
0
votes
0answers
10 views

crond regularly maxes out CPU

I'm running Arch Linux ARM and I've having a few issues with crond. I have a conky that displays the top 5 processes (in terms of CPU usage) and every few minutes, crond will appear at the top of the ...
2
votes
0answers
17 views

Performance loss when having too many files in /etc/cron.d?

Is there an amount of files in /etc/cron.d that would lead to worse performance? There are currently about 50 jobs in. In the future there can be up to 200 files in. Am I correct to expect the cron ...
4
votes
4answers
361 views

How to use “date” to print tomorrow's day of the week

On CentOS 6 Linux I use date +%a in several cronjobs and scripts to generate logfile names like myprog-Tue.txt and this works well for me since many years. But now for one program I need to delete ...
0
votes
1answer
179 views

Rsyslog hangs processes

I have a quite odd problem. At random times my dovecot daemon dies and I cannot receive/send emails while the host is still up. When trying to SSH into the server to see what happened, I discover that ...
3
votes
4answers
46 views

Is there a way to tell cron to trigger a particular cron job right now?

The cron job for updatedb didn't run because the system was powered off at the time. I'd like to tell cron to run that job now, as if now were the schedule time. Is there a way to do that? For this ...
1
vote
2answers
39 views

cron table mailx caused empty content

I'm using centos 7.0/6.5. The content of /etc/cron.hourly/mail.cron #!/bin/sh log=/var/log/mail.cron.log echo "`hostname` `date`" >> $log 2>&1 mailx -s "test mail" me@example.com < ...
0
votes
0answers
9 views

cron unavailable, how should I run old jobs?

My hosting company requires cron jobs to be entered one-at-a-time thought thier web interface rather than the command line. I've got about 70 jobs to transfer over from another host. Is it ...
0
votes
0answers
27 views

Disappearing Crontab, Odd Files

I have a number of Debian-based systems running on an ARM-based SBC connected to a network and they've been running for years. All of a sudden, when I log onto several devices, the cron file is ...
2
votes
1answer
2k views

Two parts: linux startup script to connect to bluetooth and cron to keep it connected

I have a mini bluetooth keyboard and a Raspberry Pi running a Debian-based distro. I know the MAC address of the keyboard but for this question, let's just use AA:BB:CC:DD:EE:FF. Right now I have to ...
12
votes
2answers
7k views

Set a cron every certain hours between certain hours

How can I set a cron to run every 2 hours between 8 am and 5 pm for example? Is this possible?
1
vote
2answers
2k views

How to auto commit to my git repository using cron?

I look into a lot of answers about this subject, but something is wrong here, let me explain. I create this script, to make my cron cleaner :) #!/bin/bash cd ...
0
votes
0answers
12 views

How can I queue a script to run the next time a system is up and connected to the internet?

I'm using mailsend (on a Mac) to send mail from the command line. I'd like to set this up such that I can execute a send command, but if my system is disconnected from the internet, that command is ...
4
votes
9answers
1k views

How can I write a cron job that will block my internet from 7pm to 7am? (So I can get some sleep)

I am using OSX 10.6 and it has cron built in. How can I write a cron job that will block my internet from 7pm to 7am every day? Im sure this must be simple but I could only find one example online ...
1
vote
2answers
2k views

Schedule a cron job ev X minutes, but exclude it from certain hours in the morning?

Is it possible to make a cron job run say, every 20 minutes, but make it not run for say, 1-4 in the morning.
0
votes
0answers
22 views

How to run an script using cron in Windows 7 using cygwin?

I have installed all the dependencies in cron. My scripts are working properly, and also I have tested cron which I think works properly as well. However, I would like to set up a task to run a script ...
0
votes
1answer
61 views

Ubuntu Cron ec2-create-snapshot

I have a new ec2 Ubuntu instance running. I have properly set up the ec2-api tools. I want to create a daily backup using the ec2-create-snapshot command. Just to test it, I have my script, which is ...
0
votes
1answer
50 views

Back up (save) the same file at periodic intervals

I am saving a stream in my HDD. I'd like to copy the file periodically into a subfolder backup such that the older versions of the the file are not deleted. Simply put Assume the original file is ...
6
votes
5answers
5k views

Run a cron job on the first Monday of every month?

I'd like to run a job from cron at 8.30 on the first Monday of every month. The cron Wikipedia page says While normally the job is executed when the time/date specification fields all match ...
0
votes
0answers
29 views

Is it better to use the systemd service unit's Restart & RestartSec, or use a systemd timer unit?

I have a couple of in-house automated scripts running at periodic intervals. One is every five minutes, the other is every minute. They don't really need to be ran on-the-dot; e.g. I don't care if ...
0
votes
1answer
34 views

mysql backup verification

Im not a dabase admin or advanced database user or advanced linux user.. but I would like to know how to verify mysql dumps because I am backing up my own sites manually. Normally when backing up lot ...
18
votes
5answers
24k views

How can I view results of my cron jobs?

I see so many guides on how to run crontab, but what I need right now is to learn how to Find log files about cron jobs Configure what gets logged
0
votes
2answers
102 views

crontab email is not working as expected. First I got the emails at gmail, now I'm not getting them

First I ran a simple test to see if I could get crontab to send me an email. I created the following line: MAILTO = my_email_address@example.com 1 * * * * /bin/echo "foobar" This worked as expected ...
1
vote
0answers
34 views

How can I run a cron job from PM to AM? [duplicate]

I want to execute a script once an hour from 20:00 to 08:00. Would the following work? 0 20-8 * * * location_of_script_to_run I'm currently using the following: 0 20,21,22,23,0,1,2,3,4,5,6,7,8 * * ...
2
votes
6answers
6k views

Automatically restart a Unix job if it goes down?

I have a job that I would like to "daemonize" on Unix: I want it to come up when the computer boots, and I want it to restart if it goes down. A simple way to do this is to setup a cronjob that runs ...
0
votes
2answers
66 views

How can I get a script to run constantly on Mac OS X?

I would like to do this: When the application VLC is open and I press the space bar, it pauses the video and an itunes starts to play. Then spacebar again would resume the workout video and pause my ...
0
votes
0answers
21 views

How to parallelize crontab executions to increase user base for web app based on mongodb and mysql?

I have a symfony based web application that runs on mongodb and mysql backend. The principle of the application is that for each user there is a python script that runs 4-12 times a day on cronjobs ...
0
votes
0answers
40 views

cron job monitoring script

greeting of the day!!! please help me a situation, i am trying to develop a script which provides me details which my cron job is commented or stopped which job is running or scheduled. like we ...
5
votes
2answers
2k views

Only email on cron errors for jobs in cron.daily, cron.hourly, etc

I have several cron jobs that run (in /etc/cron.daily, /etc/cron.hourly, /etc/cron.weekly, etc.) and email root@localhost with the results. I'd like to stop those emails if the jobs are succeeding, ...
0
votes
0answers
8 views

Trying to find dbus session, doesent work

Trying to use notify-send with cron, it needs dbus, what im i doing wrong? var= $(set | grep '^DBUS_SESSION_BUS_ADDRESS=') export DBUS_SESSION_BUS_ADDRESS=$var #!/bin/sh { ...
0
votes
0answers
27 views

Make a script identify DBUS session address and use it

I'm using cron with notify-send to display some notifications, but it requires DBUS session to run Here is the script: export DBUS_SESSION_BUS_ADDRESS=[session] #!/bin/sh { DISPLAY=:0 ...
0
votes
2answers
2k views

FTP from bash script running from cron not working

I have a script that is run by cron to create backup of a MySQL database and some files. After creating a tar ball and encrypting it with openSSH I have to put it on a remote ftp server. Following is ...
0
votes
1answer
15 views

Set cron's maximum run counter

How do I setup cron to run only for a specific number of times? Let's say I want to setup cron so that it runs hourly, but when the scheduler has already run five times, I want to stop cron. How do I ...
0
votes
1answer
55 views

WGET/cron downloading webcamera file

our new town doctor put a web camera to his waiting room for people to see how much crowded it is. As my mom and grandparents go to this doctor, I wanted to download the files periodically and if they ...
0
votes
1answer
232 views

How can I automatically save a list of open files in Geany, with cron or otherwise?

I use the Geany IDE for programming, and it does not reliably reload my previously open files, for example after a power outage. I found that Geany has a command line feature which returns a list of ...
1
vote
1answer
45 views

Permission Denied in Crontab

I've searched half a day for the answer to this, with no luck. Any assistance will be appreciated. I have a PHP script that modifies the crontab, loads a new cron job, removes some etc. The script ...
0
votes
1answer
54 views

Cron error “missing url”

Hope this is the correct place to post this. I am setting up a cron job to refresh a twitter feed. I want to overwrite the file each time the cron job executes. My current command is: /usr/bin/wget ...
0
votes
1answer
92 views

Simple script run via cronjob doesn't work but works from shell

I am on shared hosting and I'm trying to schedule cronjob to run every now and then. Via cPanel I scheduled to execute my script but even though that according to my host support the cronjob runs, the ...
-1
votes
2answers
28 views

What is the risk when editing crontab file without the “crontab -e” command?

I developed a script in which I add lines to the crontab file with echo command and I remove lines with sed command. I do not know the risk of that especially that I find in some web site that we ...
0
votes
0answers
28 views

Warning: the connection is closed, while running cron job

I have found on the Internet simple script to download wallpaper from bing and set it. #!/bin/bash # export DBUS_SESSION_BUS_ADDRESS environment variable useful when the script is set as a cron job ...
0
votes
1answer
32 views

Run cron task at specified day of week but at any time

I ran into trouble with cron. I need to run task on my desktop but the thing is I can't guarantee that my computer will be turned on in specified time. For example I need to execute task weakly If ...
0
votes
1answer
218 views

How to configure in crontab with condition statement for checks

We like to monitor the NAS storage mounted on a Linux box. We only like to be notified via mail when the usage exceeds a certain number, say 80. We have only seen in Linux books where most of them ...
1
vote
1answer
43 views

Script not running as cronjob

I got a script which runs in a cronjob as root. The problem is that the addgroup command would output "Command not found" when it gets executed by the script. #!/usr/bin/perl $datei = `ls ...
0
votes
1answer
40 views

Check shell Script copy Status

I have a cron script and i need to adjust it; Actually some clients are generating in a directory some files, my task is to backup that files to a tape, and i need to make a if then else cp $files ...