Questions tagged [cronjob]
The cronjob tag has no usage guidance.
89
questions
0
votes
1
answer
375
views
Cron strange behaviour
I've got a Bash script with all the permission to be excecuted, I attach it to to a cron job, this script basically only kills and restarts a specific process. The strange behaviour is that if I run ...
0
votes
1
answer
122
views
Create a folder in Win 7 where files will be deleted after a specified period automatically
I would like to have a folder to put items for temporary use and after a certain amount of time they would be deleted
Is this possible in Windows 7?
I've through of maybe some sort of .bat file in ...
0
votes
1
answer
4k
views
Cron Job Run Only Once
I set a cron job in CPanel , I am using hostinger, but it only run once even though I scheduled it to run twice in an hour, what may be the problem?
**Time** **Command To Run**
0 0,12 * * ...
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
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
479
views
Output of 'date +%a' always in system-language?
Does date +%a output always the weekday in the system language?
No matter if in bash, sh or cronjob
0
votes
1
answer
930
views
Postgresql pg_dump not working with anacron (cron.daily) on Ubuntu 18.04
I have two files called lb and z-backup. z-backup is a sh script placed in cron.daily which calls the lb (sh) script as an anacron job.
These are the files and their locations:
ls -l ~/bin/lb
-...
0
votes
1
answer
993
views
how to add timestamp to file names when moving them to cloud storage using cron job in ssh
I have built an ftp server on google compute engine that receives data from on prem systems as csv. I want to move this data after receiving it to a google cloud storage using a cron job from the vm ...
0
votes
3
answers
67
views
Log time spent between switch a Windows on and off
I want to log the time I spend between switching my PC on and when I switch it off; like have a text file updated with records of each time I switch my PC in the morning and switch it off at the ...
0
votes
1
answer
608
views
Printer unable to print "blank pages"
I'm using Xerox DocuPrint CP305 d. For some reason, I'm unable to get "blank files" printed.
If there are contents within the file —e.g. the word "test", or even just a blank space character&...
0
votes
1
answer
1k
views
Shell script not running with cronjob
I am using PUTTY to reach the server. I can dump the databases with the following command:
/usr/bin/mysqldump --all-databases | /bin/gzip > Backup_DB/alldatabases_test.sql.gz
When I am running ...
0
votes
1
answer
826
views
Cron Job Command To Delete 0 Byte Files
I need to have a Cron Job, that when it runs automatically deletes all of the files inside of a folder that are exactly 0 bytes.
The script I am using allows users to enter their username so it ...
0
votes
2
answers
1k
views
Cron job for moving directories older than 24 hours
Well, what I want to do is
The cron should run every hour or so
It should move the
directories in a folder /disk1/data/ older than 24 hours to /disk2/data/
The directories moved should contain all ...
0
votes
1
answer
1k
views
copy file from different domain using cron job
I am having two domains and i need to copy some file from one domain to another.
cp http://domain1.com/test.xml http://domain2/crontest/
I tried above but it dint work. Is there any other way?
0
votes
1
answer
3k
views
How to update svn working copy via a cron when svn server is located on local server
I have two servers. One of them has a svn server running and another hosting projects.
I have a daily cronjob updating the projects -- ie running svn update, rebuild etc.
Now, my cronjob on the ...
0
votes
0
answers
43
views
I created a cronjob years ago, now it is still running on the server but I can't locate it with "crontab -e", what can I do?
two years ago I created a cronjob which execute a python script to backup stuff. Now, the thing is that this cronjob is still running:
/var/log/cron.log.1:Oct 9 20:00:02 syslogngsrv CRON[28292]: (...
0
votes
1
answer
310
views
S3 command not working in cron
I have this ultra simple cron job:
48 20 * * * cd /home/pankaj;s3cmd -f get s3://myfile.gz
The command works by itself. But the cron job does not. The cron job
is created for the same user(pankaj) ...
0
votes
0
answers
886
views
Terminal with a command line switch --minimized (or --min etc.)
I am trying tu run terminal commands so a terminal window is shown only in a task bar or even not shown at all. There are some approaches of it with xdotool or wmctrl but they work so the window ...
0
votes
1
answer
849
views
Automating SFTP transfers
I'm new - Very new to UNIX and have been dropped in the deep end.
I an trying to automate the transfer of files from a remote SFTP server back to our SFTP server, I need to login using an SSH ...
0
votes
1
answer
339
views
How to know why crontab job is not executed
I have set several cron jobs. I recently added a new cron job that copies a file of last day from another server and is executed each day (for example at 06:00 am) but when I check next day the file ...
0
votes
1
answer
5k
views
How do i set up a cronjob in mac os that runs every 15 mins [duplicate]
I have a command that gets the utilization status of my infra and it needs to be run every 15mins. how do I set a cronjob for that in Mac OS. I searched for cron.hourly and cron.weekly but could not ...
0
votes
1
answer
239
views
Linux: cPanel queued mail stop
I got a serious mistake: I have a cronjob to send bulk email to my customers, but accidentally it worked and now some of our customers recieving the mails, I already deleted the cron job and deleted ...
0
votes
2
answers
208
views
Install cronjob from file to a specific user
I have an install script that sets up a user.
Using the install script, I want to apply a cronjob that gets executed by that user (myuser):
0 4 * * * /home/myuser/script-to-run-at-4am.sh
I have ...
0
votes
0
answers
20
views
cronjob not finding commands [duplicate]
I am running (and also new to) OS X El Capitan. I have a user cronjob that is using some basic commands that I got via brew. wget and s3cmd
I have the cronjob executing a shel script in my user bin, ...
0
votes
1
answer
451
views
chmod 777 based on directory
I am wanting to perhaps create a cronjob that will monitor a directory and will do automatically chmod 777 and files that are created inside the directory or a subdirectory of my main directory. Is ...
0
votes
1
answer
996
views
Cron file in cron.d isn't running at all, why?
I am unable to run my cron file stored at
/etc/cron.d
but it wouldn't run for unknown reasons :/ can someone please help?
Content of my cron file is as follows:
PATH=/usr/local/sbin:/usr/local/...
0
votes
1
answer
1k
views
cron job to run for last few days of month (possibly into next)
I'm trying to setup a cron job that will run from the 29th, for 4 days each quarter (Jan/Apr/Jul/Oct).
I've setup the following…
*/10 6-17 29-31 1,4,7,10 1-5 php script.php
*/10 6-17 1 5 1-5 php ...
0
votes
1
answer
899
views
Incron Job is not being executed
I am using incron to monitor one of my file in /var/www/html directory.
output of incrontab -l
/var/www/html/test IN_ACCESS /home/intel/test.sh
This job is supposed to create a file in home ...
0
votes
0
answers
544
views
cPanel/WHM - Assign cron jobs to specific account package automatically
I would like to know if it's possible to, when creating an account in a specific package, automatically assign cron jobs to run in it.
Example:
I've created the account "example", wich is in package ...
0
votes
1
answer
27
views
Do cronjobs run in CLI?
I am running PHP 5.5 with ZendOPcache integrated. There are two options for this extension - is cache enabled (which I've set to true), and the second one - is CLI cache enabled, which I've set to ...
0
votes
1
answer
801
views
Auto backup a directory to ftp server with separate files
I have 2 Ubuntu servers (Master and Mirror) and want to use cronjob to auto backup from specific directory.
I read this. It is OK but not matched my task.
Description my task: Work as real mirror, ...
0
votes
0
answers
618
views
Issue in running cron jobs in RHEL5
When I try to run cron jobs from root, I am getting the following error. I am using RHEL5. Can anyone help me?
[root@localhost]# crontab -e
Permission denied
You (root) are not allowed to ...
0
votes
1
answer
84
views
synchronize folders which are located on different servers [duplicate]
Possible Duplicate:
Synchronise system changes on two computers?
how to synchronize two folders which are located on different servers. I need that if someone put any data on folder A then it ...
0
votes
0
answers
52
views
This weird behaviour from cronjob
I have set the crontab like this:
*/5 0 * * * /www/permitChat.sh
and the /www/permitChat.sh is this:
# We are setting the name of file
# in the variable along with complete path.
sFilePath=`date +\/...
0
votes
1
answer
363
views
Crontab as other user
I am running crontab as root user:
screen -S konsola -X stuff 'say hello'`echo -ne '\015'`
How do I run it as the user "nobody"? Only this user has screen with given pid, thats why I need it.
0
votes
2
answers
2k
views
cron job not working
It is little weird now that cron job is not working as i have set. I have set weekly job to send email but i am receiving multiple emails daily. Below is my code;
# sends email every monday at 4:00 ...
0
votes
1
answer
506
views
Crontab does not launch when log out
On a google Cloud Ubuntu VM, I have setup few crontab like below :
0 15 * * * sudo /home/username/bin/python /home/username/project27/scheduler/batch.py &>> /home/username/project27/...
-2
votes
2
answers
237
views
cronjob for creating two files with 2 GB of size each
I need to create a cron job that runs every hour.
This cron job should create two files, each 2GB, one should be created from /dev/urandom and the other one from /dev/zero and should be written to a ...
-5
votes
1
answer
490
views
Schedule a cronjob start everyday automatically [duplicate]
Possible Duplicate:
Is there a way to have Linux run a command every X minutes?
I want to run a command which will be synchronize my remote folder data to my local computer.
command is sync -ave '...