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
2answers
22 views

is it possible to rsync to another server using crontab?

Hi there is a bunch of videos and resources on how to rsync locally rsync /home/user1 /home/user2/backup, but i haven't found any tutorials on rsync crontab to another server pretty much, i use ...
0
votes
1answer
25 views

watch internet connection thoguh shell

I just need to run a shell script when an internet connection is available. Is it possible to watch the internet connection arability through Shell scripting. ping google.com is the easy command to ...
0
votes
0answers
6 views

cron.daily message - return code 100

I searched for a return code and found many similar but not this identical one. It's not an error per se, but I would like to know what it means. Email from root: Subject: Cron test -x ...
0
votes
1answer
115 views

shutdown 5:30pm every day

for a five thirty pm shutdown, should I change this: 30 02 * * * /sbin/shutdown -h now to: 30 17 * * * /sbin/shutdown -h now see also: Crontab Shut down command didn't work
0
votes
0answers
57 views

How to wake up my Laptop from sleep (suspend) when AC charger connected

In my area, electricity turned off for some periods, so I configured my laptop to goes to sleep when battery percent 10%, but I want it to wake up after AC charger is charging on. is there any way to ...
1
vote
0answers
24 views

Bleachbit cron problems

I've been trying to get gnome-schedule to automate bleachbit but the crons never work. So after trying a lot different things I decided to just try setting crons the normal way. I opened terminal and ...
1
vote
0answers
22 views

Turn thinkpad screen off and back on automatically via cron

I setup my thinkpad a while back with ubuntu 10.10 to work as a digital picture frame and each night turn off the screen with a cron cron command, then in the morning another cron command turns it ...
1
vote
3answers
17k views

Use /etc/aliases for outgoing mail relayed by postfix with local domain

I'm using Ubuntu 12.04 with postfix configured as satellite system that relays outgoing mail to Gmail. For sake of example, my registered domain is example.com I want root cronjobs' error output to be ...
2
votes
1answer
46 views

Recording a youtube live stream using vlc

I'm trying to set vlc to record a live stream on youtube using cron. Vlc records videos that aren't live streaming just fine, but when the stream is live vlc records at most only 24 seconds. Why ...
0
votes
0answers
21 views

How to Schedule Rsync over SSH (Ubuntu Server, Windows and OS X Clients) [duplicate]

On OS X I want to create a cron job that rsyncs certain folders to my Ubuntu server. I do something like this: MAILTO="my@email.com" */5 * * * * rsync -avz '/local folder/' ...
0
votes
1answer
314 views

How do I set up PHP and MySQL cronjobs on Ubuntu 12.04 (Precise Pangolin) server?

I just made a LAMP install and got SFTP working. My question now is: How do I set up cronjobs on Ubuntu server? I need to make some cronjobs for my PHP/MySQL application. I look for un-activated ...
6
votes
2answers
671 views

How to start a GUI application from cron?

I need to run a Java applet from a Firefox. The problem is, I need to run this Firefox from a cron. If I run from the command line and its work fine, but when put the command in the cron it failed: ...
0
votes
0answers
20 views

Cron job for running gedit not working [duplicate]

I'm trying to set up a cron job that fires up gedit and displays a file at a certain time every day, but it's not working for me. To test it, I entered a time 3 minutes into the future, like this ...
1
vote
0answers
17 views

Why ps produce different output when it is started from a cron job?

When I run ps -f -u $USER ($USER is ubuntu) this is the output I get. USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND ubuntu 23517 0.0 0.1 22244 4856 pts/5 Ss+ ...
0
votes
2answers
3k views

How to add the logs to a crontab with time stamp

In crontab, I scheduled a daily backup script. Now when the cron executes the script the status are logged to a log file as shown below. 0 0 * * * /home/backup.sh > ...
0
votes
0answers
14 views

How does the system interprets sudoers file when there are two lines for the same user?

I have a system with a user already added to sudoers file with username ALL=(ALL:ALL) ALL Now I want to allow username to run a single script without asking for sudo password (cron job). This ...
0
votes
1answer
54 views

CRON doesn't run tasks because “/bin/bash: /var/log/cron.log: Permission denied”

I have the following CRON task: MAILTO="my@email.com" # Begin Whenever generated tasks for: projectname 30 4 * * * /bin/bash -l -c 'cd /home/deployer/apps/project_production/releases/20150305135322 ...
2
votes
1answer
48 views

can't find package crontab-ubuntu 12.04

I am trying to install cron for scheduling and before anyone says duplicate, I have tried the methods of sudo apt-get update and upgrade mentioned and they don't work. When I go to install crontab, ...
16
votes
6answers
36k 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
54 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
23 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
22 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 ...
176
votes
31answers
259k 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
24 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
56 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
19 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
42 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
65 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
44 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
16 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
25 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
29 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
14 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. ...
0
votes
0answers
21 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
582 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
517 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
1k 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
28 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
32 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
41 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
22 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
32 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
211 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
45 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
32 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
17 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
42 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
30 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 ...