Cron is used to execute scheduled commands. It acts as a task scheduler on Linux and UNIX systems which will execute commands at specified times set by the user. Cron has a great deal of customization and is often used on server environments where common tasks are run on a regular basis.

learn more… | top users | synonyms (2)

0
votes
0answers
39 views

Cron job not running at time intervals

I am new to using cron to automatically run a script. Currently, I have created a script to run every hour using the Configure Scheduled Tasks Manager. In the manager it allows me to instantly run a ...
0
votes
1answer
12 views

What if 100 or more cron setup?

Regarding cron jobs in ubunutu. */1 * * * * /usr/bin/curl --silent http://local001.erp/snippetbucket/scheduler.php */1 * * * * /usr/bin/curl --silent ...
1
vote
1answer
19 views

How to run logout with cron?

I'm creating something to allow me to set limits for time spent per user session: I've created a cron job: */120 * * * 1,2,3,4,5 /path/to/command */180 * * * 0,6 /path/to/command and I want to run ...
174
votes
31answers
251k views

Reasons why crontab does not work

Often, crontab scripts are not executed on schedule or as expected. There are numerous reasons for that: wrong crontab notation permissions problem environment variables This community wiki aims ...
1
vote
2answers
21 views

Can I add a cron job without editing a file? [duplicate]

I want to write a script that add a cron job to my crontab but without user intervention like editing a file using crontab -e. Is there a way to programatically manipulate the cron jobs from command ...
0
votes
0answers
17 views

Pngquant returns error in Crontab [duplicate]

I have created a small script to compress all the images using pngquant in Ubuntu 14.04. The script is as follows: #!/bin/bash find /home/ghosthut/wp-content/uploads -mtime -2 -iname '*.png' -print0 ...
5
votes
3answers
2k views

Programmatically sync dropbox without daemon running

I would like to 'manually' force dropbox to sync at certain times (eg at regular, daily intervals using cron, as part of a larger backup script). My goal is to substitute the dropbox daemon with ...
0
votes
1answer
35 views

Does sudo crontab -e on Ubuntu Desktop 14.04.1 work

I'm running 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Its the desktop version not the server version I needed to create some cron jobs I sudo vi ...
0
votes
0answers
17 views

nfdump schedule with cron

Hi I tried to generate nfdump file with crontab, but whatever the reason it dosent work my script #!/bin/bash nfdump -mR /home/user/test -zw /data/fnf1.dump this script itself works and all other ...
0
votes
1answer
33 views

How to disable network with crontab on ubuntu 14.04?

I am using Ubuntu 14.04 and try to disable network on scheduled time everyday. For example disable it at 5pm everyday. The first thing I tried is crontab as below: 0 17 * * * nmcli nm enable false ...
0
votes
2answers
50 views

Custom Daily and Weekly Cron Jobs Not Running

I created a script to back up my databases and my websites. It runs fine if I run it straight up but it's not running at all as a cron job. I created a symbolic link to the script: lrwxrwxrwx 1 root ...
0
votes
0answers
29 views

Running cron scripts with php and node

I've gone through many posts for cron jobs, but still was unable to run it on my Ubuntu 14.04 environment. I have a file test.sh in /tmp/test/. The test.sh contains several other scripts in PHP and ...
0
votes
1answer
14 views

Crontab once a weekday at startup

Is that possible to run task once a week at startup? For example: on monday after reboot starts command 1 on tuesday after reboot starts command 2 (but does not starts command1)
0
votes
0answers
21 views

Running apt-get upgrade in crontab

Adding sudo apt-get upgrade -y into crontab as a daily. This seems like a very good idea to make sure everything is automatically kept updated, but nobodys ever mentioned it before (and recommend ...
3
votes
1answer
23 views

Lubuntu updatedb.locate may scap bind mounted nfs file systems

I noticed that cron.daily that run updatedb.locate was talking very long to complete (if ever completing). I have interrupted last run with find taking more than 16 hours of CPU time. After ...
0
votes
1answer
12 views

Missing log file

I wrote a .jar file that is supposed to be run once a day that interacts with Google App Engine. When I run it from the computer, it runs just fine and creates a logfile that details some statistics. ...
15
votes
6answers
34k views

How do you set the timezone for crontab?

I have set up ACPI wakeup so my laptop wakes up at a certain time each morning. The timezone for this is UTC. I want to set up my crontabs also using UTC so they fit with the wakeup alarm. How do ...
0
votes
0answers
17 views

cron job to run google-musicmanager and have its indicator showing up in the menu bar

For some reasons, I need to periodically run a script with cron in order to start Google Music Manager (and to perform some music folders/files and config management stuff, which poses no problem). ...
3
votes
2answers
482 views

Ubuntu 14.04 and playing songs from cron

I recently upgraded my computer to Ubuntu 14.04. After the upgrade the system no longer plays the few songs I had it play via crontab. The crontab lines look like so: 0 9 * * 1-5 ...
3
votes
7answers
480 views

How to see if no output from `ls *.xls` command?

Ubuntu 14.04.1. I have a bash script, called by cron every 10 minutes, which basically looks for files in a subdir, then loops through and process each file. But how do I check if there are no files ...
1
vote
2answers
921 views

Cannot run bash script from crontab when it works from command line bash

I have a strange problem of being to able to run a bash script from commandline but not from the crontab entry for root. I am running Ubuntu 12.04. * * * * 1-5 root ...
2
votes
1answer
27 views

CRON settings to execute past midngith

I am trying to get my CRON job to run Monday-Friday, every two hours between 1PM and 3AM at 37 minutes past the hour. I tried: 37 13-03/2 * * 1-5 php /home/code/mytest.php But it did not run. If ...
0
votes
0answers
26 views

How to use .profile alias in crontab

I've read the answers to this question, but still don't understand what to do: http://serverfault.com/questions/119273/how-to-use-my-aliases-in-my-crontab I am logged onto my Ubuntu server as root. ...
0
votes
0answers
31 views

how to use crontab to execute i2cset commands

I am trying to execute a bash script that displays the IP address on a lcd display , on startup .. I want it to execute so that the user knows the ip address as soon as the user starts the linux ...
0
votes
0answers
21 views

CRON job not running after entering it using crontab -e

I added the following to my crontab using the following: crontab -e and then adding the following line: 37 1-23/2 * * 1-5 php /home/code/auto_processor.php >/dev/null 2>&1 The script ...
1
vote
1answer
29 views

execute the enscript command in cron job fails

When executing my backup bash script, all goes fine including executing two lines of enscript (enscript converts a log file to .html and.pdf format in my case). Problem is running the same script ...
1
vote
1answer
202 views

xprintidle doesn't work in cronjob. Why?

I have lxle (Lubuntu) 12.04 installed and I spent lots of time looking for working solution to make PC shutdown after some period of idle state. After checking many programs which haven't worked I ...
0
votes
1answer
38 views

Network scanning script - cronification issues

This is (yet) another query about cron. I have referred to the guide on this site before posting here, but I still can't get this script to work. It is designed to suspend the PC when activity on ...
0
votes
0answers
29 views

Crontab sending mails only to gmail

I set MAILTO option in cron-tab to receive emails about the output of program it runs. When i tried with my personal g-mail account (myname@gmail.com) and other g-mail accounts it worked. But when i ...
0
votes
1answer
16 views

Running a non-standard cron job

OS: Ubuntu 14.04 I would like to run a PHP script /home/app/myapp.php at minute 37 every two hours between 5AM and 7PM GMT Monday through Friday year round. What is the crontab file syntax for that? ...
0
votes
1answer
41 views

crontab sometimes doesnt work

I am trying to execute a script via crontab but some scripts work, while other do not. Why does this happen? username@here> crontab -l 00 13 * * * csh -c /home/apps/bin/jobnumberone.pl 00 18 * * * ...
1
vote
1answer
25 views

How to automaticly open a URL at specific times each day

I am using kubuntu 14.04. I have installed cron using sudo apt-get install cron, and then I created this file in IDLE, called openurl.py. #!/usr/bin/env python import webbrowser ...
0
votes
0answers
8 views

Command to sleep (put into low power state) and scheduled task to wake back up [duplicate]

I can use sudo pm-hibernate to put my laptop into a low power state, but I have to press the power button to turn it back on. Is there a way I can put it into a low power state that can then be turned ...
1
vote
1answer
177 views

PPTP won't connect from a cron command

I'm trying to work out why my VPN won't connect when the command is initiated from a cron triggered script when that same script and command otherwise work as expected. I have a remote server which ...
0
votes
0answers
18 views

@reboot in crontab could increase the startup time?

I have a script that updates my ip address in the DNS server. Sometimes this script takes 3 or 4 secs to run. I want to know if the script execution time could increase the total startup time of my ...
0
votes
0answers
23 views

Need help fixing my cron job

I just recently installed Tiny Tiny RSS. I followed the instructions from here to set up the cron job. I did this to add my cron job: sudo crontab -e This edited the /tmp/crontab.PkFSFo/crontab ...
0
votes
1answer
79 views

Autostart a Python script in an LX terminal

I have a python script which extracts continuous data from an incoming serial string and inserts the fields into an Sql database. The python script can be run manually from an LX terminal and works ...
0
votes
3answers
53 views

Copy sub-directory from 1 directory to another

I need to make a copy of the content of one directory to another. I need to copy only 1 sub-folder. For example; if I have a folder called "from" and want to copy one of it's sub-folders (with all ...
0
votes
0answers
70 views

tracking down possible file system corruption issue with f2fs

I am investigating a potential file system corruption issue running f2fs on an ARM 7 device with an Linux 3.12/ Ubuntu 14.04 stack on top. So, the symptoms of the issues are as follows: The ubuntu ...
6
votes
1answer
244 views

Schedule to record video stream in VLC

I work at a school and have setup a workstation to broadcast/stream the morning announcements for the teachers and kiddos. Teachers in the classroom access this stream via Windows Media Player or ...
0
votes
0answers
48 views

Configure when unattended-upgrades should reboot

I've set up unattended-upgrades and configured it to reboot at 3:00. Upgrades itself are installed after 4:10 so I have about one day before an upgrade will cause a reboot. Last install was this ...
5
votes
5answers
9k views

cron.daily jobs not running

I created 3 daily cron jobs to run. Below are the three that are placed in etc/cron.daily rkhunter.sh #!/bin/sh ( rkhunter --versioncheck rkhunter --update rkhunter --cronjob --report-warnings-only ...
0
votes
2answers
45 views

Best way to schedule script, crontab or other options?

I never use crontab, and while it ask me for root password, I am careful. So my question is, I have to run periodically (let's say every 30 min)a simple script for analyze the text file, which is ...
1
vote
0answers
48 views

How to run a Shell script using Crontab [closed]

I set a cron job as a root user: * * * * * /usr/bin/sh /home/abc/Desktop/AbcFolder/pqr.sh Also, I made sure to change the rights of the file pqr.sh to CHMOD 777 Below is my pqr.sh shell script ...
0
votes
0answers
34 views

I have lost the visual Cron manager from webmin

I don't know if this was an effect of the shellshock attack which my server was victim to (or another attack that worked) but it basically enabled the hacker to overwrite my SSH config file when the ...
0
votes
1answer
35 views

Scheduling shutdown in layman's terms

I'm trying to schedule a shutdown for 10:30pm (22:30) each evening. I am fairly new to Ubuntu. In Windows 7, this was an extremely easy task. Apparently in Ubuntu this is a rather complicated task. ...
0
votes
3answers
85 views

Automatic shutdown at specified times?

I'm aware I can use (sudo?) shutdown -h hh:mm in a terminal window to shut down a system, however the user that is logged in is a kiosk user, which is locked down in such a way that terminal (or any ...
1
vote
1answer
6k views

Thousands of pam_unix log entries in logwatch

My logwatch reports, within the CRON section, contain thousands of entries like those below. How can I either reduce the number of log entries OR have logwatch ignore them? Jan 30 18:49:01 ota3 ...
0
votes
0answers
29 views

User specific cronjob

I need a user specific cronjob on my ubunt 14.04 server. But if I enter crontab -e as the user, vi opens and I can see /tmp/crontab.Lb3Khc/crontab" [Permission Denied] I have already created a ...
0
votes
1answer
71 views

cron runs at wrong time

I have a /etc/crontab file. It's pretty much the default one except for the daily tasks: '# m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly ...