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

learn more… | top users | synonyms (1)

0
votes
2answers
23 views

which programs benefit the most by cron (for a SOHO user)?

I understand that cron is basically a job scheduler. Apart from doing $sudo apt update which I like/love to run manually as it's uncertain when my bandwidth will be free for running the update, I ...
0
votes
0answers
94 views

Centos7 crontab @reboot sleep not working

I am currently trying to get my server to relaunch a few things on server reboot but they were failing due to screen not yet being loaded (I believe), in an attempt to fix this I added a 3min sleep to ...
1
vote
2answers
81 views

Is it evil to link to a crontab?

I think about doing something like: sudo ln -s ~/myCustomCrontab /var/spool/cron/crontabs/username because I'd like to have all customized files in my home directory. Possible risks I can think of ...
0
votes
1answer
25 views

How to update crontab for a user with a script without duplicating comments

So I've noticed that I've dumped a lot of annoying comments in the top of quite a few crontab files by using crontab -u user -l > /tmp/crontab.user #muck with the file crontab -u user ...
0
votes
1answer
51 views

Why doesn't `date +%F_%T` work in crontab? [duplicate]

When I use time and date at the end of a crontab line like backup`date +%F_%T`.sql or like backup`date%d%m%y`.sql, my crontab command doesn't work. But when I remove it, it works perfectly. Why ...
2
votes
1answer
112 views

How to run a script in a screen on reboot

I want to start a blocking server in a screen on reboot, so that I may access it later. The command screen -d -m /home/dataserv/www/start_production_server.sh works on its own just fine regardless ...
0
votes
0answers
47 views

ubuntu Crontab not running properly

I have to run crontab in xvfb display mode forever when the system restarts...below is crontab code.... @reboot nohup Xvfb :1 -screen 0 1024x768x24 & export DISPLAY=":1" @reboot /usr/bin/forever ...
0
votes
1answer
23 views

Linux Mint 17.2 encounters an error, remounts disk in readonly

I already posted the question actually (Linux Mint 17.2 suddenly loses write access to filesystem), but since it occurs rarely I need to ask again with some new info I gathered. I suspect that this ...
0
votes
1answer
39 views

setuid.today date format changed after FreeBSD 10.2 update

My setuid.today has a different date format than setuid.yesterday: setuid.today (German localization?) 3 Dez setuid.yesterday Dec 3 I'm getting emails with the diff reports every day. I guess ...
2
votes
1answer
68 views

Access to user's session D-bus from their cron commands

What is needed to give cron commands access to the session bus (if it is running)? It used to work for me, on Debian Stretch (testing) since switching systemd until relatively recently (might have ...
0
votes
0answers
28 views

dstat not installed with cron

I have an auto install bash script triggered by cron, when some condition is met, the install process is triggered. It essentially looks like this: #!/bin/bash if [[ -f "/usr/bin/apt-get" ]]; then ...
1
vote
3answers
46 views

script not running as expected when scheduled as a cronjob

I'm trying to write a script that will identify corrupt jpg images using imagemagicks identify command. The script will run the command, grep the output for the word "Corrupt", move it to a corrupt ...
1
vote
1answer
95 views

Boot computer on schedule 2 times per weekday [duplicate]

My setup: I use Ubuntu 14.04 to perform a range of tasks. These tasks are performed whenever I execute a bash script. When it has finished the tasks the computer is automatically shut down (I don't ...
0
votes
0answers
85 views

Issues with a cron script

I have a shell script which does following: Do a scan on websites (URLS coming from all_hosts.txt), Get json reponse which is saved in file (outputscanner.txt) Run a json parser (jq) on above file ...
1
vote
1answer
32 views

handle large number of same log using cron or logrotate

We have an app deployed in a server, which, under some scenarios, generates some logs in the below format. process_name.hostname.common_text.log.{error/info/warning}.date.time Now, due to this ...
1
vote
2answers
41 views

Executing a cron 9 to 5 and at midnight

It's simple for the ones who understand it but for me most of the times it's a big puzzle. I want to execute a PHP script 5 minutes after each hour from 9 to 5 and i want to run it once more 5 ...
1
vote
1answer
30 views

Gnome Schedule cannot run hdparm

I have set up a cron job that should execute hdparm -y /dev/sda >> /var/log/diskspindown.log 2>&1 When testing it running it via "Run selected task" it executes fine and logs ...
1
vote
1answer
29 views

Run certain script periodically at boot time

Suppose the computer is being launched irregularly. And I want to run a certain script at boot time once in a month. But I can't setup a cron job as I don't know whether the machine will be booted at ...
-2
votes
1answer
62 views

Jobs not working in cron, but working manually

I have gone through similar posts in this website, but none of them is matching my query. I have the below content in my crontab, but it is not working. * * * * * perl sc.pl And when i'm trying ...
0
votes
0answers
43 views

cron not running rsync

I'm trying to setup a rsync task using cron. The point is to sync a work folder on a linux partition and its counterpart on a windows partition on a dual-boot computer. To do that, I'm trying to ...
1
vote
1answer
20 views

Correct cron format

So I wanted to execute two commands every every week at beginning of Friday 12am and Sunday night 11:59pm before it turns Monday as I want this to be turned on from friday-sunday night then again next ...
0
votes
1answer
26 views

No indication of attempt to run cron job

I am running the latest Sentora version on an Ubuntu 14 server. I created a cronjob which should run every five minutes but there's no indication of an attempt to run the cron job. I have tried to ...
0
votes
1answer
39 views

Run minecraft from script in cronjob

I tried making this command run at 10:20pm and then the second at 10:21pm but nothing works. I tried as root and as minecraft user but nothing. How can I get it to work? 20 10 * * * screen -S classic ...
2
votes
1answer
92 views

Notify-send doesn't work at Cinnamon

I am using Linux Mint 17. I want to be informed every 50 min, at every hour for small break. Here is cron job: nazar@lelyak-desktop ~ $ crontab -l DISPLAY=:0.0 XAUTHORITY=/home/matrix/.Xauthority ...
0
votes
1answer
69 views

crontab doesn't work corectly [duplicate]

I want to make some notification to user every day at the same time: any_hour:50 And I wrote to crontab -e: 50 * * * * DISPLAY=:0 /usr/bin/notify-send -i ...
2
votes
1answer
56 views

How can I get at to work on OSX?

My at on Mac OS X 10.11 seems to be incapable of launching jobs. I tried: echo "date > foo" | at now Running atq afterwards shows the job queued and no file foo was created. To make sure the ...
0
votes
1answer
41 views

Why cron not outputting to file? [duplicate]

I scheduled a cron task: 0 */10 * * * aapa bash /home/aapa/scripts/es_backup.sh &>> /var/log/super/es_backup.log It is running as logged into syslog: Dec 4 08:17:01 dexter CRON[15552]: ...
0
votes
0answers
50 views

How to view processId of process running in WINE

I'm looking to run some Windows Apps on Linux using Wine. However I need a way to check they are running (and haven't crashed). On Windows I use a Powershell script to check the relevant Windows ...
0
votes
0answers
21 views

Rebooting Ubuntu if necessary

My Ubuntu needs sometimes rebooting if it has downloaded upgrades. Can I automate it like do reboot if it is required and there is no unsaved works and I'm sleeping (say for example 3 am)?
0
votes
1answer
63 views

sort and uniq commands not running as expected when run though cron

Below is a part of script which gives proper output when run manually but gives incorrect output when run using cron: sort < file1.out | uniq -ic |sort -nr> file2.out When run on the command ...
1
vote
1answer
40 views

how do i make a script to generate a gpg backup saver?

Im making a little backup script that includes the function to encrypt the backup. The script runs automaticly with a cronjob. So the password for gpg is in a File. Its just a textfile. How can i ...
0
votes
1answer
27 views

How to set Cron job that run after every three hours for indefinite period; with Logging?

I Want to run Cronjob; after every three hours from last run time for indefinite period and can check whether it ran or not Could anyone help me in getting what values to be give in this format: ...
0
votes
3answers
192 views

Crontab on Mac OSX

I have created an /etc/crontab file on a Mac OS X that runs a few simple commands. I would like to use the crontab to echo a statement in my terminal, logout from the OS (as if I was to point my mouse ...
2
votes
1answer
29 views

How to schedule task to run everyday, if I don't know when the pc will be turned on?

So, I could use the crontab command, with: 23 0 * ... but at 23:00 my laptop can be turned off, or hibernated. In that case I want a command to be executed as soon as it will be possible. How can ...
0
votes
1answer
49 views

crontab and selinux

I have Drupal 7 on RHEL 7 and it looks like SELinux blocks crontab. aureport -a showes 90. 11/27/2015 01:32:35 httpd system_u:system_r:httpd_t:s0 87 file unlink system_u:object_r:httpd_log_t:s0 ...
-1
votes
1answer
49 views

Cron does not execute my Python script [closed]

I'm trying without success to execute a Python script using cron on a Debian Jessie Raspberry Pi. I can execute the script manually, but it fails to execute with cron. Here's what crontab -l shows: ...
1
vote
2answers
124 views

Not able to schedule tasks in crontab

[srinkann@sjc-ads-440 ~]$ crontab -e no crontab for srinkann - using an empty one /bin/sh: /usr/bin/vi: No such file or directory crontab: "/usr/bin/vi" exited with status 127 [srinkann@sjc-ads-440 ...
0
votes
1answer
24 views

Script for backup each DB on server but omit system databases

I have read a lot of post around this topic but I didn't found the one to fit my needs. So, basically I want to make two backups: one at mid day (12 PM) and the other at midnight (12 AM) for each ...
1
vote
1answer
109 views

Crontab and Tmux not playing well together

So I want my server to run a script which starts several tmux sessions on boot. This is my crontab: @reboot . /home/steven/.profile; /home/steven/Scripts/Start.sh And this is the content of my ...
1
vote
1answer
35 views

Screen creation not working on crontab

I have a problem with one of my VPSs, in the main one, the command screen -dmS SCREEN_NAME node DIRECTORY (Create a screen without joining it with the command "node DIRECTORY") works normally, in ...
0
votes
1answer
248 views

How to add subject line when sending email output of find using ssmtp

I got a script running (as cronjob) that will list the files in a folder before doing a Rsync job and emailing me the list. How can I add a subject line. find /path/to/folder/ -type f -size +1M -name ...
2
votes
1answer
78 views

How do I run a script every time “yum update” is run?

I'd like to run a script (let's say myScript.sh) every time a yum update or yum install command is executed. So if I run yum update someprogram then myScript.sh should be executed right after that. ...
-1
votes
1answer
167 views

Cron task scheduling and stopping after certain interval [closed]

I am managing a server which has multiple cron tasks, one of the crontab entry is like below: 51 ​*/2 *​ * * /root/backup.sh can anyone explain me what is happening here, at what time the script is ...
2
votes
1answer
39 views

How do I set a script to randomly print to a user's SSH session without setting it up as a Cron job?

I'm managing a small server at work that we use for Samba and SSH. I'd like to mess around with my coworkers by having a script run at random times of the day where it fetches a random quote ...
1
vote
1answer
61 views

Java file is not getting compiled in cron

Can anyone please guide me with this. I run a script file through CRON daily which involves running selenium testcases and sending the report as mail. Here is my script: check.sh #!/bin/sh set -x ...
0
votes
1answer
45 views

Cronjob to push MongoDB Backup via git

Task: Create a Cronjob that executes a bash script once every night. The bash script should do a mongoDB Backup and push it to a Git Repo. So I created a cronjob as the root user via the crontab -e ...
0
votes
1answer
110 views

a cron job to delete a specific file once it reaches more then 1gb size?

My server broke down with exenstive damages when a log file reached 27 gigs in a few hours. Log files are compressed daily, and are usually very small, maybe up to 10mb in 24 hours. Today there was an ...
1
vote
0answers
113 views

Problem using crontab playing beep sound

I'm trying to create something like a watch does. The beep sound indicating that an hour has been passed. So I opened the crontab(sudo crontab -e) and wrote this line(there are five asterisks just ...
0
votes
1answer
47 views

Running crons on a scaled mirrored servers (cron logic needed) [closed]

I have a client running on Rackspace, they have three servers that are synced together entirely, I've added a bunch of crons in the crontab using wget to the web address of the cron (that sync to each ...
1
vote
1answer
51 views

How to add change directory and git pull to this crontab line?

I have this directory structure: /var/sync/ ├── sync_bi ├── sync_pfizer └── sync_sandbox I have a few files running by the following cronjob: 10 */12 * * * find /var/sync/ -name 'Replicator.php' ...