Questions tagged [cron]
cron is a task scheduler based on clock time that runs on Linux-based machines.
912
questions
0
votes
3
answers
226
views
OsX Crontab having no effect
I am dynamically appending cron tasks to the user crontab
The tasks seem to be getting adde, crontab -e looks like:
*/10 * * * * /bin/sh /Users/john/Kiosk/app/content/update.sh
@reboot /usr/bin/open ...
0
votes
2
answers
383
views
Crontab - vim preferences
I use vim as my normal edito and so have my vimrc set up in a particular way.
I quite often find myself editing crons with the command
crontab -e
When I do, I edit in vim, but without my normal ...
0
votes
2
answers
620
views
crontab not working properly
When I run a script manually using root it is working fine. when I execute the same script inside cron it is not running. I checked the cron is actually calling the script but the script is not ...
0
votes
1
answer
509
views
Running cronjob on specfic hours
How do i setup a cronjob to run every hour except from 11pm until 1am ?
Because during that time, the system is doing maintenance.
Cheers
0
votes
1
answer
873
views
Convert cronjob to launchctl plist
I should convert this cronjob to a launchctl plist.
Is this possible?
0 8-18 * * 1-5 /usr/bin/curl -s --data "par1=a&par2=b&press=OK" http://mydomain.com/file.php /dev/null
0
votes
2
answers
3k
views
What is the difference between "periodic" and "cron" on OS X?
I bought a book on OS X and it says that launchd now control the scheduling of cron tasks, it this true?
Also it says that if I place commands in /etc/daily.local that they will execute after the ...
0
votes
2
answers
3k
views
How to setup a cronjob to auto download a file on Mac?
I'd like to setup a cron job to auto weekly download a file from my web hosting. I'm running OS X.6.8.
I want to specify the folder that the file downloads into.
How can this be done? I just want to ...
0
votes
3
answers
4k
views
FTP from bash script running from cron not working
I have a script that is run by cron to create backup of a MySQL database and some files. After creating a tar ball and encrypting it with openSSH I have to put it on a remote ftp server. Following is ...
0
votes
2
answers
18k
views
How to stop all instances of cron?
I have a cron job that executes a rake task in rails. I noticed in the log that it was running the task 4 times everytime it was executed. The problem is that there are 4 instances of cron running.
I ...
0
votes
1
answer
118
views
Failing to run an infinitely running command at startup
I want to use gpu-screen-recorder to record replays. I installed it using flatpak and am using the following command to start the replay mode:
flatpak run --command=gpu-screen-recorder com.dec05eba....
0
votes
2
answers
159
views
Cron job supposed to run on Tuesdays are running other days?
I have the following Cron rule:
0 8 1,2,3,4,5,6,7,14,15,16,17,18,19,20 * 2 /root/command.sh
My objective is to run the /root/command.sh on Tuesday every two weeks.
Crontab.guru returns the following:
...
0
votes
1
answer
67
views
Cron Disrupting VBoxManage Commands
I am on Ubuntu 20.04 desktop, running Virtualbox 6.1 and I use Webmin to run a very simple cron job to take daily snapshots of my virtualbox test server as follows:
VBoxManage snapshot VminServer ...
0
votes
2
answers
857
views
Speedtest-CLI Cron Job Not Working
Cron job is setup as:
*/15 * * * * speedtest >> /home/pi/speedtest.log
The speedtest script is:
#!/bin/sh
speedtest-cli --csv >> /home/pi/speedtest.log
That uses Speedtest-CLI. The job ...
0
votes
2
answers
596
views
Crontab entry is not working
I want a set of files copied daily from a remote server to local machine at 5 am in the morning. The following crontab entry does not work:
0 5 * * * scp [email protected]:/tmp/bkp*tar.gz /home/...
0
votes
1
answer
659
views
Cron call to script giving errors, while executing script normally doesn't
I have been having problems with executing a script every second with Cron.
This is in my cron file:
* * * * * /var/webconfig/test.sh
and this in my test.sh :
#!/bin/bash
cd /root/python-example ...
0
votes
1
answer
2k
views
Renewing Certbot Let's Encrypt WILDCARD Certificates in Cron
I've been searching for a good solution to renew WILDCARD certificates from Let's Encrypt.
It's easy to set up a wildcard certificate:
Apache Debian 9 Stretch:
sudo apt-get install certbot python-...
0
votes
1
answer
82
views
How cron job works
I am new to linux.
I have a cron job 'A' which should run every week
i used crontab-e to set it let say 3rd march 15:00 i did this.
Now today (6th march) i have to add another job 'B' which should ...
0
votes
1
answer
225
views
Install new crontab from within vim
I edit my crontab using vim (opened via crontab -e command).
How can I update the effective cron table without leaving vim?
For safety reasons crontab -e opens a temporary file (check path by ...
0
votes
2
answers
217
views
Set up `cron` job and mailto on error, on Arch
I use postfix linked to an commercial smtp server for cron jobs to send their owners an email in case of error/warning.
This is a one box Arch setup.
postfix works. So does cronie. But although the ...
0
votes
2
answers
7k
views
rsync with cron job every minute issue
I am transferring files over the network using rsync in cron job that runs every 1 one minute, task is whenever new file come it has to start uploading on remote server:
Since I am new so doing big ...
0
votes
2
answers
2k
views
transmission-daemon changes config folder on reboot
I am not sure why but transmission seems to be changing my settings on reboot.
The folder where the settings are being held is
/etc/transmission-daemon.
I run the command
sudo service transmission-...
0
votes
1
answer
2k
views
How to run a periodic scheduled job without at or cron
Scenario: You have a user with no access to cron and need to schedule a job (say an rsync of a directory). The use of at is not an option as you don't have a fixed end date.
While I bet there are ...
0
votes
1
answer
3k
views
Can cron "cache" scripts it runs?
Caveats up front:
1. My *nix knowledge is very limited but growing.
2. This particular issue applies to SunOS 5.10 (I know) but I'd be interested in general answers.
If a cron entry runs script ...
0
votes
1
answer
45
views
What's wrong with my cron command?
I'm running cron from cpanel, i want to run one file and when it is finish the next one. this is my command
/usr/bin/wget -O /dev/null -o /dev/null https://example.com/file.php > /dev/null 2>&...
0
votes
1
answer
3k
views
Crontab script not saving result in file
I want to backup my database everyday and i have written a script
my.cnf
[client]
host=locahost
user=root
password='pw'
script.sh
#!/bin/bash
/bin/mysqldump --defaults-file=/home/wasifkhalil/my....
0
votes
3
answers
235
views
Cron job does not execute
I have following cron jobs:
* * * * /usr/local/bin/email_redirect
* * * * /usr/local/bin/email_redirect
The python script is never ran and also nothing is written to syslog:
Nov 27 19:09:41 ...
0
votes
1
answer
240
views
Why is this simple cronjob not running and how do I check the relevant log files?
I have an 'R' script that I wish to run at 00:30 every day, that is, 12:30 AM everyday. The script itself is located in ~/Desktop/foldername/runme.r and which Rscript tells me that the exact path to ...
0
votes
1
answer
11k
views
How to set cron expression to run first Weekday (MON-FRI) and first Weekend (SAT-SUN) of the month?
I tried for the Weekend (SAT-SUN) cron expression:
0 0 18 ? 1/1 SAT#1,SUN#1 *
but it didn't work.
0
votes
1
answer
744
views
How do I catch and log all attempts to write to /dev/null?
Essentially I'm trying to catch output any scripts that are currently running and silencing their output.
So the question is fairly simple, how do I log any attempts to write to /dev/null?
0
votes
2
answers
4k
views
Cron job string settings to fire 4 times a day in between 5-10
* 5-10 * * * will fire the script between the said timings but how will I control the count?
BTW the count and the timings can be anything, means it will be dynamic and not static. Just put up a ...
0
votes
1
answer
59
views
Cronjob etiquette?
I am a student at a relatively small university. I wrote a script that sends me an email when a math newsletter comes out, so I can get a head-start on the problem of the week.
I plan to run it as a ...
0
votes
1
answer
2k
views
Can't create incron job
I am trying to create incron job, but no success.
When I type:
incrontab -l
I got:
no table for vujke
and when I type:
incrontab -e
I got:
editor finished with error: No such file or directory
...
0
votes
1
answer
787
views
Cron jobs on IBM i 7.1
I just found out today that on an IBM i system I am able to use SSH to get to a Unix-like terminal (AIX/PASE) and would like to use this to schedule automated tasks using crontab. Does anyone know if ...
0
votes
1
answer
1k
views
"echo" prints the options in crontab
I'm running Rasbian 3.12.26+ on a Pi model B.
Here is what my cron entry looks like:
* * * * * sleep 11; { echo -en "\e[1;4;33m"; date; echo -en "\e[0m"; curl -k "http://sampleurl.com/update.php"; }...
0
votes
1
answer
812
views
How to delete all files inside public_ftp folder—and its sub folders—which are older than X days using cron job?
I want a way to run daily cron job on aserver that will delete all files only (not folders) which are older than X days from today's date, in the public_ftp folder and all its sub folders to a ...
0
votes
2
answers
2k
views
Script for CRON (FTP get files EVERY MINUTE)
I want to create a script that
must run with a CRON every minute (Q: Is it wise to run CRON FTP/wget every minute?)
compares local directory with remote directory (Q: do I use FTP or wget and how do ...
0
votes
2
answers
9k
views
apache crontab not executing
I use cron to execute some php scripts (owncloud background tasks etc). My server runs nginx and PHP via php-fpm, which by default runs PHP processes under the apache user, the only user with write ...
0
votes
3
answers
1k
views
Automatically Create text file of folder contents
I have a set of directories that have files in them for use with LiquidSoap for use with IceCast2
Currently, every time I remove a file or add a file, I have to edit the txt file listing the mp3s to ...
0
votes
1
answer
359
views
How to execute a php file when a cron job is created
I want one of my PHP file to be executed when the cron job is executed. I want to do this for updating the database of every users. It is a Banking application project and I need to update every user'...
0
votes
4
answers
2k
views
How to run the shell script periodically without using Crontab?
I do not have previlage to use crontab -e to run my script. Is there other way to periodically run my script? Basically I need to run it once a week.
0
votes
1
answer
2k
views
Cronjob does not work
I tried to set up a cronjob on my server. Actually this command should execute a java programm every hour. But somehow this didn't worked. I googled and tried to set up a test-script that should run ...
0
votes
1
answer
817
views
Ubuntu Precise cron.daily issue
I have a very strange problem. I've placed a script into /etc/cron.daily on my Ubuntu 12.04 server, gave it the appropriate permissions (0755), and assumed it would run correctly. I guess that was too ...
0
votes
2
answers
519
views
cron: log output of job, email errors?
This is a ridiculous newbie question, sorry!
I am running a (Python) script regularly using cron.
I would like to log the output to a logfile, and I would like to be emailed with any errors that ...
0
votes
2
answers
508
views
How do can I update a Form using shell/bash script on Linux?
I am wondering is it possible to echo values like below described? The situation is - there are too many "doc" files named like "PLCI507_01234567.doc", and there is a Form in a text file named "form....
0
votes
3
answers
191
views
Free app to run task of visiting a url
I need to run an .asp webpage on my site every 40 minutes.
Does anyone recommend a free web-based app that I can enter in my url and it will visit the url every 30 - 60 mins?
preferably one without ...
0
votes
4
answers
1k
views
cron jobs made in cPanel don't show up in PuTTy
Why don't cron jobs, that I have made in cPanel, show up when I use PuTTy and type crontab -l?
0
votes
2
answers
4k
views
How do I write a bash script to detect a mounted USB drive?
I'm triggering a script from cron.
I want it to run rsync ONLY if a USB disk called "data_3" is mounted,
otherwise not.
How do I write a bash script to detect a mounted USB drive ?
My current ...
0
votes
1
answer
5k
views
Cron Job problem - No such file or directory error
I am on shared Linux CentOS hosting with multiple domains hosted on a single account.
For one of the domains I need to run a cron job. But when I try to run that it gives me this error:
/bin/sh: ...
0
votes
1
answer
60
views
Run Command after Laptop unfold
I want to run a bash file at a specific moment a day. (8:00 and 20:00).
I've already managed to do this via crontab and also on startup if my computer was shut down at the time. My only problem is ...
0
votes
1
answer
214
views
cron.d script launching then dying
Many stack posts seem to suggest something like:
* * * * * root /usr/bin/pgrep -f 'socat -T10 TCP4-LISTEN:22222,fork UDP4:localhost:22223' || (/usr/bin/socat -T10 TCP4-LISTEN:22222,fork UDP4:localhost:...