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

learn more… | top users | synonyms

0
votes
0answers
2 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 ...
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. ...
10
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?
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

Is there a replacement for cron with webinterface?

I am searching for a replacement that lets me view and edit the jobs and their schedules in a webinterface. It would be especially good if there's a history of the execution of jobs available or at ...
0
votes
0answers
15 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 ...
1
vote
0answers
10 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 ...
0
votes
1answer
36 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
46 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
21 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 ...
-1
votes
0answers
20 views

Redmine mail software not working

I'm having a huge problem with redmine and I need to solve it in 2 days. So my prob is, redmine has not an email send recognition thing integrated. Usually every support system has something when I ...
34
votes
7answers
62k 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
26 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 ...
17
votes
5answers
23k 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
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 ...
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
60 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
18 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 ...
1
vote
3answers
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
25 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
7 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
18 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
13 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
45 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
218 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
33 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
16 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
58 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
27 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
22 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
30 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
195 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
36 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
31 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 ...
0
votes
0answers
112 views

Copying file to AWS S3 from a cronjob

This is a script I've put in my /etc/cron.daily on a Ubuntu Server box: #!/bin/sh /bin/echo "Running upload-logs at $(/bin/date) as $(/usr/bin/whoami)" >> /tmp/upload-logs.log /usr/bin/find ...
2
votes
1answer
48 views

Have cron parse SSH config file for server addresses and options

How does one configure cron to parse ~/.ssh/config to get the IP addresses and other options (such as IdentityFile) for SSH? Obviously adding source /home/user/.ssh/config does not help. I do not ...
0
votes
2answers
1k views

How do I write a bash script to detect a mounted USB drive?

I'm triggering a script from cron. I want it to run rsync ONLY if a USB disk called "data_3" is mounted, otherwise not. How do I write a bash script to detect a mounted USB drive ? My current ...
8
votes
8answers
6k views

Error adding cronjobs in Mac OS X Lion

Until now, I have never attempted adding a crontask on my Mac. To my surprise, it threw an error.. [hayek@mac:/www/] 02:33:22 PM: crontab -e ...
1
vote
0answers
37 views

How to Schedule Tasks according to several Timezones

I need to use Windows Scheduler or any other app for setting jobs at a concrete time depending on destination country. That means scheduling a job at 7 am (UK Timezone), another at 7 am (US ...
0
votes
1answer
29 views

How to run a launchd task every weekend once?

I am trying to run a ruby program as a cron. I have figured out how to run the ruby program from a launchd The problem is that I don't know how to say "Run the job once every Sunday". Below is my ...
0
votes
1answer
52 views

Shell script not running with cronjob

I am using PUTTY to reach the server. I can dump the databases with the following command: /usr/bin/mysqldump --all-databases | /bin/gzip > Backup_DB/alldatabases_test.sql.gz When I am running ...
1
vote
1answer
163 views

Tracking down edits to my /etc/hosts file

Every hour at :49, my hosts file is being replaced with the following: # Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file ...
0
votes
1answer
62 views

Cronjob immediately shuts down mac after boot

I was messing around with cronjob trying to get it to forcibly shut down at a certain time everyday, but now I can't keep my computer on. It boots, loads whatever needs to load on startup, then ...
1
vote
2answers
40 views

Automated apt-get upgrade quits midway

I set root's cron to automatically run apt-get upgrade. Easy enough. Here's the specific line: @daily (apt-get update && apt-get -y upgrade) 2>&1 > /var/log/tmp.log However, I've ...