Cron is a job scheduler that allows users to run commands periodically.

learn more… | top users | synonyms (1)

2
votes
3answers
9k views

crontab -e , then 0 * * * * = every hour; then xclock

After sudo crontab -e (it wrote "/tmp/crontab.XXXX70pN9h" 1L, 19C 1,1 All Then I saved the file. And to check..? (how? i don't know) And to check I ps -e | grep cron 29818 ? ...
2
votes
2answers
559 views

Is there anything in unix crontab to determine this should be executed in PST/CST standard time?

There is this thing in QuartzScheduler where we can say execute this in CST/BST/ or whatever timezone. This is also good when you want to execute some jobs in certain timezones and certain jobs in ...
2
votes
1answer
142 views

Need to find a cronjob

I have a problem, some user ,and I'm not sure who, on one of my servers wrote a cronjob that executes every night at midnight. The cronjob creates a sql dump of a database which is then grabbed by ...
2
votes
2answers
2k views

stop parallel processing for a cron triggered process

I have configured my webservers cron jobs to trigger some php script, every 15min, but sometimes the script takes morethan 15 min to complete execution, by the time another process of the same script ...
2
votes
3answers
1k views

Anacron job complains “Gtk-WARNING **: cannot open display”

I'm trying to make a simple weekly Anacron job that backs up my computer if I click yes on the dialog. The script I wrote works fine if run manually, but when Anacron runs it, nothing happens and I ...
2
votes
3answers
49 views

Limit a text file to 100MB

I have several log files on my server that I would like to limit to 100MB large. I'm considering creating a cron job that will run once a month and remove the oldest characters (closest to the top) ...
2
votes
1answer
122 views

Executing PHP with CronJobs in CentOS 6.4 not working?

So I've spent around 2-3 hours now and some times researching, I found several of the same responses online but none seem to work! I'm trying to execute a PHP script every minute (as a test), but it ...
2
votes
1answer
220 views

cronjob for automatic DB backup to date prefixed file

I am using the latest Linux Mint. I was wondering if it's possible to create a special cronjob for a database backup. In my /etc/cronjob file I have the following code: # Minute Hour Day of ...
2
votes
2answers
111 views

Running cron.daily in parallel

Being able to put a script in /etc/cron.daily is really nice because I can do it easily from a configuration management system or a package. However, my understanding is that all the entries in ...
2
votes
1answer
663 views

“stdin: is not a tty” mails for running scripts as cron jobs

I have several shell scripts (bash) which are started by cron. Every time a script is executed I get an email saying "stdin: is not a tty". Can someone please tell me how to fix this? All scripts run ...
2
votes
1answer
1k views

Crontab + Ruby on Rails: /usr/bin/env: ruby: No such file or directory

I have a ruby on rails app and I need to schedule a crontab for a rake task. */5 * * * * RAILS_ENV=production /usr/local/bin/rake -f /usr/local/www/mysite-web-production/current/Rakefile ...
2
votes
2answers
389 views

Logrotate doesnt start proftpd triggerd by cronjob

Im currently running of ideas. The proftpd doesn't restart, if logrotate is triggered by the cron task. Logrotate rotates all logfiles stops proftpd but does not start proftpd again. If i force the ...
2
votes
1answer
459 views

How to add crontab in FreeBSD

I am trying to add a job to my crontab in FreeBSD but it is not working : I have used this to add the job: sudo crontab -e -u vaibhav @daily /home/vaibhav/applications/comparison/scrapy but it is ...
2
votes
1answer
96 views

Executing 'ssh-add -D' from a cron job doesn't work

I've set up an openSSH server on an ubuntu-server machine, and I configured it to use public/private key (without password). I want to require both password and key check when the client connects to ...
2
votes
3answers
882 views

Solaris: how to forward cron e-mails?

If a cron job produces output it is e-mailed to the user's account. I would like to redirect this e-mail to another e-mail account. Preferably on a user-by-user basis. I've looked into some options ...
2
votes
2answers
3k views

Run a sudo (or startup) python script from cron on a Raspberry Pi?

I'm helping out with an art project (http://stargateeggbeater.com/ for those interested) built on Raspberry Pi. The RPi controls an addressable LED strip through the GPIO, using the spidev device per ...
2
votes
4answers
2k views

How to display a (zenity/GUI) dialog to the user after a root cron task has completed

I have a simple periodic cron task that must run as root. I want to use Zenity (or similar) to display a GUI informational dialog to user 1000 (or logged in user or all users) when the cron task ...
2
votes
1answer
205 views

ipsec auto --status fails in cronjob

I have a server monitoring script which, among other things, checks the state of an IPSec tunnel using ipsec auto --status It works like a charm when run from the console (as root) but as soon as I ...
2
votes
3answers
301 views

cron, every minute ram issues

I have a cronjob which runs php on a wordpres cron.php file. Its mainly used to schedule post and i believe it may refresh cache. Anyways... I run the cron job every minute. I checked out the ps ...
2
votes
2answers
458 views

changing default shell to /bin/bash of at job scheduler like in CRON

I recently switched from 2>&1 >> to &>> Is there a way to have at use /bin/bash as the shell? By default it uses /bin/sh and the man page gives no indication how anything else ...
2
votes
1answer
70 views

App which can execute arbitrary code on different events

I've been looking for a simple activator which can execute some code when stuff happens, I haven't found anything yet. Maybe, I am not using the right keywords. It would be great if someone pointed me ...
2
votes
1answer
595 views

Check for process already running in webfaction?

I use Django framework on webfaction and have 5 different cron jobs. One of them lasts much longer than others and sometimes gets stuck (30-120 seconds or more). I have already set that cron job to ...
2
votes
1answer
227 views

Can I bypass crontab command by putting the file?

I need to create and put my cron file with cat cronfile1 cronfile2 > cronfile crontab cronfile -u myuser This works for me, but I want to know if I can do directly cat cronfile1 cronfile2 > ...
2
votes
2answers
2k views

Configuring cron.hourly

I am unable to configure a cron job to run by placing it in /etc/cron.hourly folder. SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts ...
2
votes
1answer
55 views

How do I set cron to run on background?

I am on ubuntu 12.04 and following this tutorial. I want to setup cron to run in the background but I don't have a chckconfig in sbin so I can't run sudo /sbin/chkconfig crond on I am fairly new to ...
2
votes
1answer
32 views

XML command line tool postgres

I have an XML files to read and load into database daily at night (cron) So i planed to do this in a batch. Is there any command line tool to : 1. Create a postgres schema using an XSD file? 2. ...
2
votes
1answer
30 views

Conflict between cron.deny and allow who wins?

which one wins in conflict deny or allow? Is the behavior the same for hosts.allow and all the other similar files?
2
votes
1answer
195 views

Why do deleted files continually reappear?

I've been having a strange issue recently, where I would delete files from a location (i.e. Desktop), and then empty the Trash. However, a day or so later (I'm not sure exactly what triggers it), the ...
2
votes
1answer
150 views

kill process in script while writing file behavior

in my php script which runs as a cron job, I have foreach($sites as $site) { exec('./wkhtmltoimage-amd64 ' . $site . ' somefile.png'); exec('./zopflipng -y somefile.png somefile.png'); } ...
2
votes
1answer
166 views

Crontab change MAILTO for only one specific job in Root's crontab

Can I do the following to change where mail goes for one specific crontab job in root's crontab (don't sent to root for Do Something job, just send to porklover): # Make a hambone appear * * * * * ...
2
votes
1answer
776 views

Is there a update manager whitout gnome dependencies for xfce?

I'm looking a update manager for Debian Xfce. I installed xfce on a computer which will be use by laypersons. Therefore, I want another way (graphical) to launch apt-get update && apt-get ...
2
votes
1answer
152 views

output of top gets truncated to 80 columns when run by cron

I have got the following logging script: #!/bin/bash top -b -c -n 1 >> /var/log/toplog/top.log And the following record in my crontab: */1 * * * * /home/clime/scripts/toplog.sh The ...
2
votes
2answers
301 views

command not running in cron (systemctl suspend)

I have this cronjob set : * * * * * /usr/bin/systemctl suspend And it is not working. But I can run it in a shell and it works. I don't understand what could be not working. EDIT Redirecting error ...
2
votes
1answer
236 views

systemd - Timer units that mimic anacron behaviour

I need to write a timer unit for a machine which is turned of frequently (e.g. classical desktop setup). This timer unit needs to be activated regularly but not very often (e.g. weekly, monthly). I ...
2
votes
2answers
3k views

What are the permissions of a cron job?

When a cron job runs with what privilege does it execute? I'm not sure about that. Is it with the same privileges of the user that added it via crontab -e?
2
votes
1answer
2k views

Cron daemon error : Permission Denied

I am having trouble setting up a cron job. My set up is as follows: crontab -e */10 * * * * OTP_ProJect/PandaServerInfo/SVN/PandaQueueMonitoring/trunk/submit_cron_test.sh the shell script has ...
2
votes
1answer
265 views

How does fcron knows whether the job was run?

I recently migrated from vixie-cron to fcron on my laptop. I have a question: how does fcron knows if a particular job was run in given period of time? As a file can change during running, what ...
2
votes
0answers
70 views

`crontab -e` sometimes fails with “Creation of temporary crontab file failed”

From time to time crontab -e fails on me on a Ubuntu box. It is the same for all users including the root and crontab -eu <user> under the root. Goes like this on a regular basis, a success here ...
2
votes
1answer
53 views

Solaris cron ignoring mail aliases?

As a Solaris user, I want cron jobs generated emails for the localuser@server to be forwarded to my myuser@sample.com email account, so that I read only one inbox. To resolve this I have forwarded ...
2
votes
1answer
250 views

bash script - supervisor program

I have to write a shell-script that have to do the following tasks: -in every 5 seconds it saves:     -how many users are using joe and/or vi;     -if ...
2
votes
2answers
240 views

Strange crontab-script interaction (bash)

I'm running Ubuntu 12.04 and bash. I've written a pair of shell scripts that allow me to set an alarm which, after ringing, unsets itself. The first, alarmset, allows me to enter a time and modifies ...
2
votes
0answers
99 views

Use dedicated per-user log file for cron and?

On Ubuntu 12.04 how can I configure cron to log to a particular file when it runs jobs as a particular user? I am interested in redirecting both the messages that go into auth.log and those going into ...
2
votes
1answer
273 views

Cron & Gnu Screen - Trouble with detached screen [duplicate]

Possible Duplicate: sending text input to a detached screen I have a script for my Minecraft server that runs automatically every 15 minutes. The problem is that after a server reboot, ...
2
votes
1answer
86 views

Cron does not execute xinit command

I have a command that works perfectly when launched from the prompt: xinit /home/user/myscript.sh -- /usr/bin/Xvfb :1 -screen 0 1x1x8 But is not executed when put in crontab: @reboot xinit ...
2
votes
2answers
276 views

Why are new cronjobs ignored unless crond is restarted in SLES?

I added a new cronjob with a user (SUSE LINUX Enterprise Server 9.4): # su - XXX $ crontab -e and this is what I added: * * * * * echo `date` >> /home/XXX/a.txt but the a.txt isn't ...
1
vote
3answers
167 views

dpkg-reconfigure: not found when running in cron

I have a virtual server (debian) and the clock fails to sync from time to time (probably because i save/restore state with vboxheadlesstray). To fix this issue I run dpkg-reconfigure ntp && ...
1
vote
2answers
330 views

Is it possible to have a cron job run more frequently than once every minute?

CentOS 6 I have a shell script that performs a task every minute. The task itself only takes a couple seconds to complete and ideally I'd like to have this shell script execute 2-3 times per ...
1
vote
3answers
1k views

Why can't cron job find basic Linux commands?

I'm trying to set up a cron job to run a PHP script daily as part of a web-based booking system. It's been running perfectly for several years on a different Apache server using this in the crontab: ...
1
vote
2answers
808 views

CentOS, PHP file is running from browser, not from cron daemon

I am working on CentOS. I have created a PHP file which run from browser http://mydomain.com/backupfile/dobackup.php I have added the script from crontab and made the file executable, but it is ...
1
vote
3answers
484 views

Why does Crontab give me an error with my PHP script when running it from the terminal does not?

I'm having some problems with running the Crontab with PHP files. I have this same php scripts running in the Crontab for more than 6 months but some days ago mysteriously they stopped to execute the ...