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

learn more… | top users | synonyms

0
votes
0answers
72 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
0answers
37 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
121 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 ...
0
votes
0answers
13 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
58 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
88 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
1answer
33 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
130 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 ...
1
vote
1answer
325 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
283 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
287 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
40 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
46 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
46 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 ...
1
vote
1answer
73 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
62 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 ...
2
votes
1answer
126 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
1answer
61 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 ...
1
vote
0answers
95 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
64 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
187 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
293 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
129 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
98 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 ...
0
votes
2answers
47 views

User-friendly wrapper or replacement for `at` command under OS X

I often want my computer to automatically add something to my to-do list at some point in the future. In some cases I want to add the same thing at regular intervals. In these cases I use OS X's ...
0
votes
1answer
146 views

Shell script truncated when run from cron or at

I'm seeing some very strange behavior on a Linux based NAS (DNS-323) I have. I'm using a simple shell script to back up the files on the NAS to another box. After making some recent additions, the ...
1
vote
1answer
660 views

Can postfix forward all outbound email to a relayhost except for local user-to-user email?

On my home Ubuntu box, postfix is configured to relay all outgoing email to outgoing.verizon.net. Unfortunately this includes local user-to-user email (e.g., from local cron jobs to me, or from me to ...
0
votes
1answer
60 views

Use of crontab, kill and trap

I'm learning crontab command, and I'm doing some tries. I edited the default crontab file with the command crontab -e, and I want to put a line that every minute send a SIGUSR1 to the current shell ...
0
votes
1answer
208 views

Editing IPTABLES nat rule in cron job

I am sitting here with an issue: I need to switch the source interface for iptables' NAT rule at a given time. I want to basically do soemthing like this - caution: concept code: #!/bin/bash if [ it ...
0
votes
1answer
197 views

Who starts updatedb process and why it uses 700+% CPU?

I have a VPS running CentOS, and recently its CPU usage goes over 700% for two times already. It always turns out to be a process named "updatedb" (as show in the figure below). After a quick ...
0
votes
1answer
80 views

How to update CRL automatically?

I have the following issue: I have a self-signed CA (certificate authority) mainly for persoanl use (mail encryption and signing, ...). I created several ceertificates and the CRLs (which are empty ...
0
votes
0answers
223 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 ...
1
vote
2answers
94 views

Executing PHP from crontab

I am utilizing crontab to execute a PHP file as follows: 0 4 * * * /opt/lampstack/php/bin/php /opt/lampstack/apache2/htdocs/tests/test.php I am pretty sure that the file itself is working properly ...
0
votes
0answers
11 views

logging jobs submitted by at vs by cron

I can schedule a job via cron so that the job's output is stamped at the time the job is run. Pseudo-code: DATE_CMD='date +%Y-%m-%d-%H-%M-%S-%N' * * * * * ~/bin/foo >> ...
1
vote
1answer
39 views

Why is this cron sometimes activing daily and sometimes every three days? (which it's intended to)

I have a line in my crontab like this: 01 6 * * */3 $TASK The variable $TASK emails me a particular email. I understand that I have written the cron to trigger this action at 06:01am every third ...
1
vote
1answer
203 views

How can I run a Cygwin command (not a Windows native command) as privileged?

If I open a (elevated via UAC) Bash Shell in CygWin: Luis@Kenobi /cygdrive/c/Windows/system32 $ crontab.exe -l -u Luisito must be privileged to use -u Tested on WinXP-SP3 and Win7-SP1. Same results ...
0
votes
1answer
119 views

How can I select what user account will run a Windows service (run as) from command-line?

As one of the steps for installing CRON daemon for CygWin in Windows, it is worthful (not mandatory on WinXP, but seems to be greatly adviced since Win7) to change (along with some others ...
1
vote
3answers
2k views

Why does this script fail when run from cron, but works when run manually?

I have a relatively simple bash script that works great when invoked directly, but fails when run by cron. Why does this fail and how can I make it work via cron? #!/bin/bash apt-get update -y ...
1
vote
1answer
50 views

What permissions do I need to give my user to run “shutdown -r 5” command from cron?

I’m have a bash script that I run in /etc/crontab on Linux $ uname -a Linux mymachine.com 3.4.76-65.111.amzn1.x86_64 #1 SMP Tue Jan 14 21:06:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux The bash ...
3
votes
0answers
588 views

Running cron on Cygwin to call notifu

I have installed Cygwin with cygrunsrv and Cron so I could use the benefits of using Linux-style scheduling in Windows. I want to call notifu from a cron job. I Installed cron as a service using the ...
0
votes
0answers
91 views

Cronjob doesn't seem to work in Parallels Plesk

I set up two cronjobs in Plesk using their interface, but they don't seem to work. What's wrong? * */1 * * * curl --silent --compressed http://*****.com/assign_social_scores */5 * * * ...
0
votes
1answer
140 views

How do you use the run-parts command?

For some reason my crontab is not running the hourly/weekly/etc scripts. It seems to be that run-parts is not working and I cant get it to work on my local machine as well. Is there a mistake in the ...
0
votes
2answers
49 views

Using cron vs. system managed service for frequent tasks

If some task should run in an frequent but not neccessary precise manner, what would the benefits of using cron vs. just using a service (eg. managed by upstart) with a loop script like #!/bin/sh ...
1
vote
0answers
55 views

Cron deamon written in shell

I'm looking for a script in bash or ksh, that would do ... more or less ... the same as crond. The situation is, that our system administrator suddenly denied the use of crontab to all regular users ...
0
votes
0answers
56 views

Scheduling a job using launchd to run on the last day of every month

I am using Mac OS X Server 10.8.3. I want to schedule a job using launchd so that the job will execute at 2:00 pm on the last day of every month. How can I schedule this through a plist file? I have ...
0
votes
1answer
28 views

Tools for coordinating crons across users

I often find myself in a situation where I have several cron jobs that want to be run together and rely on certain jobs to be finished before they begin. If I'm running crons that require lots of ...
1
vote
2answers
583 views

RSYNC over SSH requesting password

I looked at numerous question but don't seem to find quite what I'm looking for. I've created a script in which I'm trying to run rsync over ssh, this will eventually be put into a cron job. The ...
0
votes
1answer
414 views

Why does this bash script give an error on Ubuntu but not OSX

#!/usr/bin/env sh export $NODE_CONFIG_DIR=/Users/full/path/to/script/config cd /Users/full/path/to/script /usr/local/bin/node main The script runs locally on OSX (if I adjust the paths for the local ...
1
vote
1answer
341 views

Cronjob for first day of month except sunday

I have such entry in my crontab: 0 0 1-2 * 1-6 It is correct that it would run at 00:00, 1st or 2nd day of the month from Monday to saturday? For example, if 1st day will be sunday then it would not ...
2
votes
2answers
1k views

How to use @reboot in /etc/cron.d

I am migrating individual user's crontabs to /etc/cron.d, as that would allow proper backup, restore and versioning. So far, as I understand the only difference between user's crontabs and the etc ...