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

learn more… | top users | synonyms (1)

2
votes
1answer
999 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
199 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 ...
1
vote
3answers
41 views

How to only output commands from CRON?

INPUT: * * * * * ( /path/to/foo -x ) 3 * * * * /full/path/tothing 3 3,2,4 * * * /full/path/tothing4 3 OUTPUT: ( /path/to/foo -x ) /full/path/tothing /full/path/tothing4 3 Q: How can I truncate ...
1
vote
2answers
3k views

Globally change path for all users, even in cron

We're setting up an SGE cluster with CentOS 6. My sysadmin is installing applications that are not installed via RPM (i.e. via other means like make install) should go in a non-standard directory, in ...
6
votes
1answer
3k views

How to change cron shell (sh to bash)?

Is it possible to make commands in crontab run with bash instead of sh? I know you can pass commands to bash with -c, but that's annoying and I never use sh anyway.
3
votes
3answers
563 views

Rsync problem with cron and no problem manually

I have a backup.sh file that launch an rsync command. This rsync is to backup my dedicated server on a RaspberryPi running raspbian. (I use keychain so I don't need to type any password etc ...) The ...
2
votes
2answers
208 views

How can I manage my crontab effectively to avoid issue by multiple updates by multiple users?

I have a crontab that includes many users updating it. The problem is that because of this, it is not easy to know who did what modification of a cronjob. I was thinking to create a script to do a ...
2
votes
2answers
357 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 ...
0
votes
1answer
139 views

Cron Job Clean Directory

How is it possible to delete files older than 14 days in a folder using a cron job? Everything I have tried so far hasn't worked.
2
votes
3answers
534 views

cron: bash syntax not working

I am trying to add following command to crontab: I=1; for X in $(/bin/ls -r /var/tmp/*); do [ $((I++)) -le 28 ] && echo "lower" || echo "higher"; done When executed on the command line (in ...
2
votes
2answers
473 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
167 views

Cronjob output to log

I'm using a script for testing broadband speed and I would like to set up a cronjob for testing every n minutes and output to a file. The command to launch it from a shell console and append to ...
0
votes
2answers
3k views

What is wrong with my cron job?

I'm new to linux, and was told I could use a feature called cron job to run a python script I made execute every 10 minutes. Problem is the the python script isn't running. There doesn't seem to be a ...
2
votes
2answers
695 views

Need help with a script to test for memory usage

I'm trying to put up a temporary band-aid while I work out a solution for a app's memory leak. What I wrote was a small bash script that I put in the root on the server. This is what the script is ...
0
votes
1answer
769 views

Cron does not print to syslog

I have following crontab file - # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and ...
0
votes
1answer
1k views

Cron job does not fire up after a timezone change

I've tried eliminating many of the common errors, 1) ensuring that the PATHs are available for cron 2) there is an endline at the end of crontab file 3) the timezone is set-up by: cd /etc cp ...
4
votes
2answers
388 views

why doesn't 0 0 * * 1 root hostname >> /tmp/hostname.txt work as a crontab?

0 0 * * 1 root hostname >> /tmp/hostname.txt The above cron entry should run midnight on monday and create a file in /tmp called hostname.txt with the output of the hostname command. But it is ...
2
votes
2answers
313 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 ...
0
votes
1answer
124 views

Why does OpenSSL automatically send me Terminal mail?

I for some reason am getting messages from OpenSSL constantly (not literally constantly, but every hour or so) sent to my Terminal mail box saying: Message 1: Subject: Cron ...
4
votes
3answers
1k views

Cron allowed special character “L” for “Last day of the month” on Debian

I'd like to know if L is one of the allowed special characters on Debian's cron implementation? I'm trying to set up a cron to run on the last day of every month. From the cron entry on wikipedia: ...
4
votes
3answers
569 views

Cron to not run on specific day but all other days

I have a cron setup to execute a bash script daily at 10pm. I have another cron setup to run monthly on the 1st of the month. Both crons launch a bash script, and the only different in the bash script ...
1
vote
1answer
107 views

Get system notification at a certain time?

Is there a way, in Linux or FreeBSD, to receive notification from system at a specified time? I'm thinking something in like of what inotify in Linux does for filesystem events. There IS a way to ...
3
votes
2answers
502 views

setting a cronjob in IST time

I am trying to set a cronjob run in a different timezone. I've googled a lot and found editing /etc/default/cron is the way to go. But this file is deprecated and I see the following message, so I ...
0
votes
0answers
30 views

Is there something as flexible as crontab for user-level autostarts? [duplicate]

I'm looking for a flexible per-user initialisation tool to kick off user daemons when the system (re-)boots. I suppose something similar to crontab would be great, which works for every user ...
1
vote
1answer
159 views

How to figure out what is performing scheduled server reboots?

I'm helping a friend with a server and it appears the server reboots every week on Sunday night. How can I figure out what is causing is the server to reboot? Aside from rebooting, the server appears ...
1
vote
2answers
439 views

Run a cron job every minute, meaning of syntax [duplicate]

I read somewhere that you can add a cron job to run every minute like this: #min hour day month weekday command */1 * * * * <your command> What does the /1 part mean? Can I ...
0
votes
3answers
796 views

Custom crontab does not work (FreeBSD)

I created file crontab.custom with: */1 * * * * /home/username/data/www/run.sh And run.sh contains: php script.php After this I run this command crontab crontab.custom. Now crontab -l ...
2
votes
1answer
547 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 ...
1
vote
1answer
115 views

Script to restart the application

I need to write a script for the below scenario in Linux: Run a cron every 5 minutes. grep the application log file to see if we can see the pattern "ORA-". If we see this pattern: stop the ...
1
vote
1answer
151 views

Launch 2 celery processes via cron

I'm trying to chain some commands to periodically check/launch two processes via cron (I'm on a shared host, can't change things around). After a lot of googling around, all the things I've done don't ...
7
votes
1answer
550 views

How to autostart a background program by a non-root user?

As a non-root user, I want to run a background job when the system boots. It's sort of a service which doesn't require root privilege. Is there a way to do it? One way is to put sudo -u user command ...
1
vote
1answer
548 views

Cron automated bash script to run run 1 bash script then another, plus integrity check

So I have a custom in-house app developed by a 3rd party. When the app is running, I can verify it is running with the "screen -ls" command. As long as screens are running for rails and freeswitch ...
3
votes
1answer
911 views

Cron job still running when deleted

On a server I inherited, there is a cron job running hourly on one of the Debian servers. It sends an email out to a non-existent email, but bounces back to my account since I listed myself as the ...
2
votes
1answer
106 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 ...
1
vote
1answer
952 views

Pimp rsyslogd to have less i/o (cron, pam,…) and less logging

On my raspberry I really don't need crons and pam logging and I want to have less i/o to make the SD card life a little longer.. I have already removed cron with the second line cron.none, I'm ...
2
votes
1answer
288 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
346 views

Stop cron sending mail for backup script?

I have set up a backup script to back up world data on my Minecraft server hourly using cron, but because the worlds being constantly edited by players, tar was telling me that files changed while ...
2
votes
3answers
1k 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 ...
1
vote
0answers
26 views

Script executed from cron doesn't display GUI notifications [duplicate]

The script below has the name notifyrssh.sh. 1: File=/home/vaios/Desktop/tempcron/liveusers.txt //OK 2: cd /home/vaios/Desktop/tempcron 3: ps -aux | grep sshd > ...
1
vote
0answers
113 views

Scheduling cronjobs at specified time

I have scheduled some jobs in crontab which are to be run one by one, at some specific time. My script for crontab is : 15 10 * * * /Users/sri/files/BatchFF.sh 45 11 * * * /Users/sri/files/BatchGC.sh ...
2
votes
2answers
4k 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 ...
1
vote
1answer
107 views

How can I create cron jobs in specific files?

I want to have a separate folders for cron jobs like: /mydata/cronjobs Now in that folder I want to have files like backup_server which will have the content like: 30 3 * * 1-5 ...
4
votes
1answer
713 views

How is cron scheduling actually implemented and makes sure scripts run on time?

I want to ask about cron jobs. OK, we place the scripts in the crontab and the cron daemon executes them. Now if I understand this, each minute, cron checks the crontab of each user and executes the ...
2
votes
2answers
4k 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?
1
vote
1answer
172 views

Deadlock in a crontab between cron and its child defunct processes

I'm having a strange case of deadlock, where the two processes launched by cron are defunct, but cron does not pick the return code and exit. I don't have access to the root user. myuser@myserver:~) ...
2
votes
4answers
2k views

Crontab not working

I'm trying execute a basic shutdown crontab to run M-F at 10PM. So I did the following: sudo crontab -e Once inside of the crontab I added the following line: 0 22 * * 1-5 shutdown now The job ...
3
votes
2answers
423 views

Cron jobs and mail notification

I have (from one tutorial) cron job which make weekly backup on my website and is working fine. #!/bin/bash NOW=$(date +"%Y-%m-%d-%H%M") FILE="mysite.com.$NOW.tar" BACKUP_DIR="/home/user/backups/" ...
3
votes
4answers
3k 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 ...
3
votes
2answers
135 views

Cron job for every minute executing out of order?

I'm setting up some shell scripting to be executed every five minutes, then every minute on our client's system, to poll a log and pull some timing information to be stored and accessed by another ...
1
vote
1answer
80 views

Cron job doesn't seem to be executing in ubuntu

I have a script located /myscript/script.sh and I have a cronjob that I submitted like this: sudo crontab -e The contents of the crontab are as follows: */1 * * * * ./myscript/script.sh The ...