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)

1
vote
1answer
3k views

Running PHP Cron Job with Arguments

Im trying to run a PHP script, once a day, on ubuntu 13.10 server with php5. I have cron jobs set up, via ajenti control panel, verified with crontab -l, for this command. php /path/script.php ...
1
vote
1answer
11k views

Open firefox from bash file “Error: no display specified”

I need to open a browser and access my server with the ip address 1.2.3.4. First I ping my server and if the ping did not fail I launch the home page in a browser. For this I have written a bash file ...
0
votes
1answer
89 views

Why the cron job did not fire on ubuntu 12.04?

Here is the script sqlite_backup.sh under $HOME/: #! /bin/bash now=$(date +%d) echo "Welcome to Sqlite backup script" sqlite3 /var/www/db/nbhydb.sqlite3 << EOF .timeout 20000 .backup ...
0
votes
0answers
941 views

Java -jar runs via shellscript but not via cron

I have a shell script that I want to schedule via cron to be ran every 10 minutes. The shellscript runs a jar file. If i run the shellscript via ./sensorrreader.sh it works just fine (creates a file) ...
0
votes
0answers
25 views

Crontab is not giving me error notifications [duplicate]

I don't always have the most reliable internet and I miss the feature in Windows where you're network icon changes. So far the only thing I can find to replace this is a cron job that pings. I set up ...
1
vote
2answers
53 views

Network Information for Theft Prevention [closed]

I haven't seen much of this around, and I'm not a network expert/sysadmin, so I need some advice. I have a laptop that I'd like to "protect" against theft (this is really a game more than a real ...
1
vote
1answer
244 views

System crontab entries not being run

I am running Ubuntu 12.04 LTS Desktop. I have used the /etc/crontab to set up a couple of entries that should run at different schedules. Now, the problem is that these do not seem to be running. I ...
0
votes
0answers
66 views

Cron not running script

I have a script that works when called: /usr/local/bin/myscript #this works fine Permissions for the file are: -rwxr-xr-x 1 root root 155 Jan 27 09:34 myscript I've added a line to /etc/crontab: ...
1
vote
1answer
3k views

no crontab for [username] - using an empty one

I want to run a bash file (abc.sh) on the desktop that runs a python file on the desktop as well. How can I do that? I tried to do the following simple task just to test the crontab: (here the abc.sh ...
0
votes
2answers
4k views

How to remove or delete single cron job using linux command?

I have created cron jobs for my site which is listed below and they are working fine.I print all cron job by using this command $cronfiles=exec('crontab -l',$output); echo "<pre>"; ...
1
vote
1answer
156 views

Why do I get that error from a CRON job?

I am trying to write a cron script to check if my minecraft server is running or not and if it is down to run the start up script. Here is what I have and this is the error I get when running it ...
0
votes
1answer
58 views

Only part of crontab working [duplicate]

i have a line in crontab: * * * * * date >> /home/pana/temperatures.txt; hddtemp /dev/sda >> /home/pana/temperatures.txt ;hddtemp /dev/sdb >> /home/pana/temperatures.txt ;sensors ...
3
votes
4answers
92 views

Is it possible to limit Software Center or apt-get install downloading to a specific time of day?

I have free bandwidth everyday from 12 am till 7 am. That means I put everything that I want to download in the software center and go to sleep. I want the download process to stop at 7 am. For that ...
0
votes
1answer
65 views

cron not outputting correctly?

Please forgive my ignorance. I have searched, but perhaps I’m not sure really what to search for in order to answer my question myself, so I’m turning to this forum for a little guidance. I’ve ...
2
votes
1answer
133 views

Where to check if a cron job was ever run?

I set a few cron jobs locally on my machine. They were supposed to run each night at 8 PM. Where can I see or check that they actually run?
0
votes
1answer
72 views

A shell file containing count but not showing when I try to run from crontab

I am new in writing shell script i write a script like this #!/bin/bash PID=$(ps -ef | grep "sh gps.sh" | grep -v grep | awk '{print $2}') if [ -z $PID ] then cd /opt/etrans/cronjobs ...
1
vote
0answers
127 views

Configuring logrotate without root access (per user log rotation)

How best can logrotate be configured, on a per-user basis, to rotate files in the home directory of the user, under control of a per-user 'crontab -e'?
2
votes
2answers
1k views

Setting cron to run a shell script: random wallpaper from a webpage

I have written a shell script which downloads random wallpaper from a web-page and sets it as a background every 5 hours. Here is the script: #!/bin/bash countervar=1; finish=0; cd ...
1
vote
3answers
2k views

Who is sm-msp-queue and how does he/she/it flood my /var/log/syslog?

I run Linux BeagleBoard-xM 3.12.5-armv7-x10 #1 SMP Fri Dec 13 03:06:20 UTC 2013 armv7l armv7l armv7l GNU/Linux and my /var/log/syslog gets flooded by messages like Jan 11 10:21:09 BeagleBoard-xM ...
0
votes
1answer
487 views

How can I get mysqldump to use the credentials from mysql_config_editor in a crontab-executed script?

I am setting up a daily backup of a MySQL 5.6.14 database using mysqldump on an Ubuntu 12.04 Precise server. I created the credentials file in the root home directory (.mylogin.cnf) according to the ...
0
votes
1answer
70 views

Crontab script entry not working

beginner here. I have a script called updateTf2.sh It's contents #!/bin/bash /etc/init.d/srcds stop ./steamcmd/sh +login anonymous +force_install_dir ./tf2 +app_update 232250 +quit ...
0
votes
3answers
215 views

Can't get crontab to repeat command every five minutes

I'm trying to make crontab run a sh script every 5 minutes. This is my root (sudo crontab -e) crontab setup: */5 * * * * /etc/test.sh and this is the script: #!/bin/bash echo "time:$(date)" ...
0
votes
1answer
177 views

Running Key Remap Script at Startup

I'm trying to re-map my left Alt key to the Alt Gr and Alt Gr to Left Alt. So far I've been able to do it in terminal, but it never runs it on start up. I've read multiple AskUbuntu questions, but ...
0
votes
1answer
107 views

crontab entry to reboot than email

I got my weekly crontab reboot entry to work using /sbin/shutdown -r but now I want it to email me when the reboot happens. Ideally I would like the email to happen after it rebooted so I know the ...
0
votes
0answers
60 views

Folder Action for Ubuntu [duplicate]

I have a question concerning Ubuntu folder action , I need a script to notify me when a file is add to a folder or the folder changes , is there any possibility for that. I found some articles ...
0
votes
1answer
60 views

Cron Script Length

I have a backup script, a script that cyncs file with other files on my computer, and a script that uploads files to my website with ncftp. I used cron to load .sh files, and my shorter scripts work, ...
1
vote
0answers
84 views

Using a NAS as a collective dump, with symlinks for whoever uploaded each file

I have a local machine that was sitting around & doing very little, so I decided to turn it into a NAS (Network Attached Storage) machine, with a 40GB disk for Ubuntu (13.10), a 160GB disk that's ...
0
votes
2answers
384 views

how do I use upstart, instead of cron, to start a single instance of a job which should always respawn?

How do I script the following bitcoin/dogecoin/etc cpuminer command: /home/digger/cpuminer/minerd -o stratum+tcp://doge.pool.webxass.de:3333 -O <user>.<worker>:<worker_password> ...
0
votes
2answers
3k views

cron error: bad username

I've basically re-written the terminal output instead of appending a series of edits to this question: root@doge:/etc/cron.d# root@doge:/etc/cron.d# tail /var/log/syslog Dec 21 11:35:01 doge ...
0
votes
1answer
196 views

task scheduler in system settings does not appear

i install KDE's Task Scheduler to be able to access to crontab via GUI . After install , i try to open this soft , however , i cannot find where it is. I follow this DEMO on Youtube , and i note ...
0
votes
1answer
108 views

Need To Rotate Logs From Virtual Hosts on Ubuntu VPS

I have a 1gb VPS running ubuntu that I have installed Apache, Mysql and PHP. I have 3 sites all in my home directory that are using name based virtual hosting. I have created three separate files ...
0
votes
1answer
470 views

Rtcwake based script not working as cronjob

I'm trying to use the following wake script, which I found here, to put my computer to sleep at night and wake it in the morning. The script uses rtcwake: #!/bin/bash # Auto suspend and wake-up ...
1
vote
1answer
531 views

Mysterious Ubuntu restart (with logs)

My Ubuntu 13.10 was running a simulation that should last for days, but it for some reason rebooted automatically. The log said: Dec 17 10:24:26 phz225 cron[1078]: (CRON) INFO (Running @reboot jobs) ...
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
3answers
1k views

How to do svn update without password on crontab

I'm new to svn and ssh. I'm trying to do svn update of 5 repositories in my local system every 3 hours on crontab. So, to achieve this I have setup ssh passwordless login using the below steps: 1. ...
2
votes
1answer
289 views

What happens to cron jobs when the system is down?

As the title suggests: What happens to con jobs scheduled for a time when the system is down for any reasons as server maintenance or whatever? If it is simply not executed: Is there a way to ...
0
votes
2answers
539 views

In a cronjob copy files and change their names to unique values

I want to make a cronjob that makes a copy of every file in /var/log, and puts it in /etc/bak. That i do by making an sh file saying cp /var/log/*.* /etc/bak I would like these files not to be ...
0
votes
1answer
60 views

Restart service minutes after startup

I have a situation where I'm looking to run a service restart a couple minutes after startup. The particulars as to why are as follows, but the essense of my question is basically captured in in that ...
0
votes
1answer
50 views

crontab formats

I want to run few crontabs at startup and also at regular intervals. I have used the below format - # M H Dom Mon Dow 0 7-21/2 * * * //this will run daily from morning 7:00 to 21:00 clock with ...
0
votes
1answer
637 views

Cron running job multiple times

Hello I have a cron job that I have setup, everything was working just fine until a couple of minutes ago when my cron job scheduled to only run every five hours started to run several processes every ...
0
votes
1answer
290 views

Using rsync to mirror folders on NAS

I have an old netbook that I use as a torrent server running utorrent on ubuntu and accessing with the webUI, at the moment I add links through the UI and then manually copy the files over to my NAS. ...
0
votes
2answers
2k views

How to install changes to /etc/crontab

If I want to add lines to my system's /etc/crontab, what do I have to do to get them to take effect? Background: I'm trying to set up a machine with Ubuntu 13.04 so that it automatically ...
0
votes
1answer
1k views

Running a script everyday using a cronjob

I need the exact code that I would use because I'm not able to figure it out. I use crontab -e to set up a cron job but when I save it, it never works. I'm also just trying to run a file called ...
0
votes
2answers
1k views

Crontab and sSMTP

My server is Ubuntu 12.04.3 Cron jobs are working fine. I can send emails through command line, either using mail, ssmtp or sendmail. I have set the correct email address on top of the crontab -e ...
0
votes
1answer
127 views

How to execute a script with Cron

I would like to schedule a simple script to execute when the machine reboots. I have other schedule other commands in crontab using @reboot without any problems, but I can't seem to get my script to ...
1
vote
3answers
2k views

(Xubuntu) How to set the wallpaper using the command line?

I've done a lot of googling but haven't been able to find a solution to my problem. I am a teacher and I'm using Xubuntu on some student computers. I have everything locked down pretty good, but I ...
3
votes
1answer
147 views

Unable to start Ubuntu. Unknown Job

I'm new to Ubuntu. It asked me to reboot because of updates. Now it doesn't start at all. I've managed to get to GRUB. I went to previous versions, and selected the only one available ...
1
vote
1answer
5k views

Crontab Shut down command didn't work

I wanted Crontab shut down the system daily but it didn't do so, did I misspelled something? This is my Crontab file: /etc/crontab: system-wide crontab Unlike any other crontab you don't have to ...
1
vote
1answer
311 views

Cron job creating empty files in root

My cron job, command looks similar to this: wget -q http://whatever-url/ It is running correctly (every minute). Problem is that it is creating empty php files at my root for every minute it runs. ...
0
votes
3answers
80 views

Cronjob for specific hours

I need a cronjob with criteria to power on/off a TV on the basis: Mon-Fri, power on the screen at 07.00 and power off the screen 17.00. Friday after 17.00 to Monday morning to be powered off. I'm ...