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

learn more… | top users | synonyms

0
votes
1answer
17 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
62 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
37 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 ...
0
votes
2answers
18 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
22 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
33 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
30 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
21 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
25 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
33 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
34 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
30 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
33 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
10 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
18 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
43 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
33 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 ...
0
votes
3answers
114 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
21 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 ...
2
votes
0answers
67 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
13 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
36 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
20 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
48 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
26 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
22 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 ...
0
votes
2answers
100 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
72 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
72 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 ...
0
votes
2answers
96 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 ...
1
vote
1answer
43 views

Why doesn't this cron job run?

My cron job isn't running on my system. Any idea why? % ps aux | grep cron root 4213 0.1 0.2 5548 1496 ? Ss 12:40 0:00 /usr/sbin/crond -n crontab.txt: * * * * ...
0
votes
1answer
31 views

I've made a php page as a cron job, how should I format the page?

So, a while back I was looking at how to make them, got it just about figured out, and then found out with 000webhost you can only link to files in your website, and couldn't write a command line ...
2
votes
1answer
12 views

Scheduled tasks / cron on Haiku?

It doesn't seem to be called cron on Haiku and I don't see anything in Preferences or Applications as of the latest nightly. (Where) is this functionality in Haiku / what is it called? (I also ...
3
votes
2answers
147 views

Shell script running from cron not running python

I have python program, I want to run it everyday with different variable (on CentOS server): #!/bin/sh /usr/bin/python /root/testing/test.py --variables /root/testing/daily/test1.txt while [ $? != 0 ...
0
votes
1answer
70 views

Cron unable to run shell script

I have been trying to get a shell script to run for hours using cron to no avail. I am trying to have the following bash script run every minute #!/bin/bash ...
0
votes
1answer
37 views

Export org agenda views periodically in Emacs

To export org agenda views in a text file for further processing, I run (org-batch-store-agenda-views) periodically as an Emacs batch job run by cron. Because there is some overhead in starting an ...
0
votes
0answers
97 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
2answers
280 views

Will cron.daily wait for jobs to finish before starting the next one?

This page http://wiki.ci.uchicago.edu/I2U2/WebalizerConfiguration suggests renaming /etc/cron.daily/logrotate so it comes after /etc/cron.daily/webalizer - webalizer should be done before logrotate ...
0
votes
1answer
33 views

How do I monitor resource usage of crond php scripts?

I am using a VPS which is running 5 php scripts on a minute by minute basis using cron. Each script, itself, loops to execute a mysql query then sleeps for between 5 and 15 seconds. They all ...
1
vote
1answer
142 views

Ubuntu start Node.js server and open Chrome in kiosk mode

I'd like for a computer to immediately start a Node.js application on boot. I'd then like Chrome to open in Kiosk mode, but only after the server has been started. Looking on the Ubuntu Stack ...
0
votes
0answers
15 views

Cpanel cron timing issue

I am running a cpanel server. I set a cron task to run every minute. So in my cron tab I set like below- * * * * * php /path_to_script >/dev/null 2>&1 Initially the task added ...
0
votes
0answers
45 views

Rsync delete issue

I implemented rsync to backup the data from the server to my local machine,and done it regularly by cron. It works fine but yesterday it deletes the files from the folders on my local machine but on ...
0
votes
1answer
205 views

Setting Up a Python Cron Job

I hope you guys can help. I've never set up a cron job before but would like to run a daily Python script at 5am on my server. I'm using hosting from CrazyDomains.com.au (Linux server) and can't find ...
0
votes
0answers
27 views

Issues with Cron Mail

I am running a script via cron on a server named backup.server.redacted.org (name made up). The webmaster team's email address webmaster@something.redacted.org, which is the MAILTO= in our crontab. ...
0
votes
1answer
118 views

crontab a bash script that is copying certain files

First I would like to say that I am terrible with scripting so this has been a true challenge for me. Any input would be great! I would like to automate an sftp transfer every 24h. If I am lucky in ...
0
votes
1answer
36 views

Crontab stopped unexpectedly

I have following entries in the crontab: 0 0 * * * /mnt/voylla-production/releases/20131111011431/script/rubber cron --task util:rotate_logs ...
0
votes
0answers
17 views

Run task periodically depending on last successful run

I am looking for a way to manage a script execution. The only requirement is to execute a command depending on the time of the last successful execution. For example: I want to mirror my latest ...
0
votes
0answers
46 views

Macbook with lid down goes back to sleep right after scheduled wakeup

I'm trying to run an app from crontab at 3 in the morning. My 2010 MacBook Pro running OSX 10.7.5 is usually turned off at this time of the night, so I'm setting Energy Saver's scheduled wake up at ...
0
votes
3answers
546 views

SCP not working in CRON job, only manually

I have a script on a remote server (bServer) which SSH's to a central server (let's call it cServer) and kicks a script which further SSH's to 2 other servers (server13 / server14). A script is run on ...
0
votes
0answers
114 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 ...