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

learn more… | top users | synonyms

4
votes
1answer
643 views

Shell script of mysqldump works fine when run manually, but does not run in the cron job?

I have a shell script to get a MySQL database dump. This script works fine when run manually #!/bin/sh fqn=/home/Mysqluser/daily_dumps/bookstore_`date +%Y%m%d_%H%M%S`.sql.gz mysqldump -u root -h ...
3
votes
0answers
583 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 ...
2
votes
0answers
24 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 ...
1
vote
0answers
93 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 ...
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 ...
1
vote
0answers
84 views

Ncat throws errors while being run from crontab

I have a simple script set up on my OpenWrt box to check if one of the computers in a local network is streaming, and if it does, the script starts wget | madplay to play the stream. Script works ...
1
vote
0answers
89 views

Enabling crontab logging on openSUSE

I am trying to enable the crontab log on openSUSE 11.3. I searched the web but couldn't find how to do it. I only find information about Ubuntu. Tried editing the /etc/rsyslog.d/remote.conf file but I ...
1
vote
0answers
96 views

script executing perfectly in terminal but not in cron

I setup a script for to take an mysql db backup everyday on a specific time, so now the cron is running perfectly it executing the script without problem but the problem is db backup file is not ...
1
vote
0answers
443 views

“ssh_exchange_identification: Connection closed by remote host lost connection” when running cron job

I have a Ruby script that connects to a remote machine via ssh and executes a command. The script runs fine when I just run it in my terminal. In my crontab, I have 1 * * * * /bin/bash -l -c 'ruby ...
1
vote
0answers
416 views

Inconsistencies with SCP for Ubuntu and Windows Server 2003 (using CygWin 1.7.x.x)

Some days ago I was able to scp to the remote server from my windows server 2003 using cygwin to copy the id_rsa, using scp (id_rsa.pub location) user@example.com now it(scp) seems to be not working. ...
1
vote
0answers
929 views

Why does cron task run twice?

I have a task that should run each day in Ubuntu10.04. So I use crontab and copy the scripts of the task to the directory /etc/cron.daily. Here is the my crontab: # /etc/crontab: system-wide crontab ...
1
vote
0answers
312 views

What happens if cron.daily is not terminating

Today I had to realize that some cron jobs werent run on my server! In the log files I find this: Mar 13 03:30:01 osp-server anacron[7261]: Anacron 2.3 started on 2012-03-13 Mar 13 03:30:01 ...
1
vote
0answers
41 views

query a URL every H hours for changes in the results?

How can I query a specific URL (mostly html and js) every H hours for changes in html content, which is mostly an html table with some header, and have the results fed to an RSS? This URL in question ...
1
vote
0answers
638 views

Set the from address on emails from cron/Set default from address for sendmail

As a normal user I can send email, either from the commandline or from PHP. But when a cron job has error output, sending of that email fails (I have a MAILTO=me@example.com at the top of the ...
1
vote
0answers
100 views

script -e and crontab or at

I have a shellscript I want to run via at and use script to capture a transcript. script -e was introduced in util-linux-ng 2.18 and returns the retval of the child process. I want to capture the ...
0
votes
0answers
9 views

Logrotate not rotating on file size

According to the man page "Normally, logrotate is run as a daily cron job. It will not modify a log multiple times in one day unless the criterium for that log is based on the log’s size". So, ...
0
votes
0answers
17 views

Delete messages in Gmail “All”, “Incoming” or “Sent” folder

I use one Gmail account only for mail relaying from my home server to different accounts, to multiple users. The problem is that there are some thousands of emails on this account in the "Sent" and ...
0
votes
0answers
34 views

Not able to open crontab -l

I am running crontab -l to view the crons on a RHEL server(v5.10) and getting the below error: crontab: error while loading shared libraries: libaudit.so.1: cannot open shared object file: No such ...
0
votes
0answers
20 views

How do I launch a gui app from a script called in cron in Linux?

I understand that cron doesn't like launching apps that have a gui. I am trying to google around this, and I found that it is possible, but I need to tell cron which display to launch it in. Well, I ...
0
votes
0answers
15 views

Emails from root while working with Horton Sandbox

I recently installed the VM for Horton Sandbox (CentOS 64) and I consistently get the notification: You have new mail in /var/spool/mail/root and when I go there I see notices of the form: 22 ...
0
votes
0answers
71 views

Correct crontab settings on Cpanel/WHM Cron on CentOS 6.5

I have recently migrated from collocation to Amazon EC2 and setup new WHM installs with CentOS 6.5 I then used the Transfer tool to move all websites to the new server, however I am trying to transfer ...
0
votes
0answers
37 views

Maintain screen session when executing shell script on boot

Solved: I solved this problem by introducing a delay before executing the script: @reboot sleep 60; /root/start_server.sh On Ubuntu 14.04, I have a crontab entry set to run on reboot: @reboot ...
0
votes
0answers
49 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 ...
0
votes
0answers
16 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 ...
0
votes
0answers
15 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
31 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 ...
0
votes
0answers
13 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
0answers
69 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
0answers
69 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
36 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
12 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
57 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
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
0answers
221 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 ...
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 >> ...
0
votes
0answers
88 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
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
0answers
34 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
52 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
0answers
61 views

How do I launch an hourly version of anacron?

I have a cron job (system update) that fires off every hour. However, I would like it to be reset every time the machine resumes from standby or hibernation. The command is already launched at each ...
0
votes
0answers
234 views

Crontab command set not working

I'm trying to set up crontab to run a shell script, but for some reason, the script doesn't get executed. I'm on system with OS X 10.8.5. crontab file 0 12 * * 1 /absolute/path/to/myscript.sh 0 15 * ...
0
votes
0answers
27 views

How do you commit changes to an XML file to source control when they are changed by the users of a web app?

An admin web app (closed-source, 3rd party) that we use generates XML files into the Linux server where it is running. These XML files contain application settings for a production application. Only ...
0
votes
0answers
204 views

Cron job not working due to wget error

I'm setting up a CRON job on my MediaTemple DV4 to generate a sitemap. To test I ran the command via the command line: wget ...
0
votes
0answers
32 views

This weird behaviour from cronjob

I have set the crontab like this: */5 0 * * * /www/permitChat.sh and the /www/permitChat.sh is this: # We are setting the name of file # in the variable along with complete path. sFilePath=`date ...
0
votes
0answers
149 views

Will my weekly cron job work?

I'm just getting back into bash scripting and I want my cron job to run every 15 minutes between 9.15 and 10 PM. I've checked the script works, but I don't know if it's the right command: ...
0
votes
0answers
495 views

How to set cron HOME environment variable?

I am using esmtp to send email as an output of cron job. The SMTP server and credentials configuration are stored under my $HOME/.esmtprc. However it looks like the $HOME env variable is set to '/', ...
0
votes
0answers
1k views

Running a bash script at random times using cron job

I need to monitor intrusion on a server at (relatively) random intervals. For that I have set up a cron job to run every hour. I have written three scripts: wrapper script that calls a ...
0
votes
0answers
428 views

user crontabs don't work, only /etc/crontab

Hi when I use the command crontab -e to set up cron, the commands get triggered (according to syslog) but nothing happens. Also if I run sudo crontab -e. The only way to actually get cron working ...
-1
votes
0answers
11 views

CRON @reboot vncserver?

Is there any reason per-user cronjobs running vncserver @reboot wouldn't run? When I reboot the machine and look into /var/log/syslog, I see the jobs being run, then cron saying (CRON) info (No MTA ...