Skip to main content

Questions tagged [cronjob]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
275 views

Include hostname in crontab MAILFROM?

We have a lot of servers on RHEL8 & RHEL9 and would like to set something like this in crontab: [email protected] Problem is that HOSTNAME is not defined in the environment ...
Rop's user avatar
  • 1,399
16 votes
2 answers
9k views

Can I specify a specific time with seconds with Linux crontab?

49 18 * * * mpv ~/Musik/Donau.mp3 This command would play the Donau.mp3 file at exactly 6:49pm. How could I, for example, specify 6:49:50pm?
Peter Andres's user avatar
1 vote
2 answers
665 views

Cron Job command - understanding

I am using a cron job, received from one of my suppliers, in order to create/update the products data, stock, status, in my Woocommerce website. I have installed their plugin, all verification are ...
Alin H's user avatar
  • 11
0 votes
0 answers
61 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]: (...
amigood's user avatar
0 votes
2 answers
583 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
Omexlu's user avatar
  • 123
2 votes
1 answer
25 views

Trying to run a shellscript but not workung

My shell script is running when I manually run it. Cronjob is also working, al others are running but not this script. This is my code. 30 3 * * * cd /var/www/html/cronjob && sh shellscript.sh ...
Shibin Mariyan Stanly's user avatar
1 vote
0 answers
155 views

Lynx-dump cron job not working after installing SSL certificate

I have a cron job that has always worked fine, until we installed an SSL certicate and updated our .htaccess file to redirect all http requests to https. Now, the cron job is not working and I'm ...
Claire K's user avatar
0 votes
1 answer
334 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) ...
kargirwar's user avatar
  • 183
1 vote
1 answer
900 views

How would I make a cron job stop and start again?

I am trying to make a cron job that stops at 12am today(friday) then start again Monday at 7am, what would the script for this look like, I am new to cron jobs.
MrPigbot's user avatar
1 vote
0 answers
387 views

Task Scheduler don't start Task every hour (Windows 10)

I configured a powershell script to grab some reddit rss feed. So I set the task to run every hour once to grab new feed items. But I can only run/trigger it manually. It won't start at every even ...
Georodin's user avatar
  • 167
2 votes
1 answer
4k views

How to test cron @reboot entry?

How can I test if @reboot is working without the need of reboot the machine? Is there anyway to force @reboot to entry to run? Thank you.
Augusto Will's user avatar
0 votes
0 answers
1k 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 ...
Adam Mazurkiewicz's user avatar
1 vote
0 answers
1k views

McAfee Endpoint Security for Linux Threat Prevention cannot schedule ODS-Tasks [closed]

McAfee Endpoint Security for Linux Threat Prevention, Version : 10.5.4.106 We are working on a Linux server with a pre-installed McAfee. The regular ODS-Scanning has been really annoyed us. So we've ...
xulin tan's user avatar
0 votes
1 answer
1k 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 -...
speed bump's user avatar
0 votes
1 answer
1k 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 ...
Be2's user avatar
  • 55
0 votes
1 answer
1k 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 ...
Paul's user avatar
  • 1
1 vote
2 answers
330 views

cron job not executing the binary in the time specified

I would like to check which is the environment being used if executing a cron job. I had it working before however it stopped at some point. This is my cron job in the crontab file: 20 13 * * * /usr/...
birdman's user avatar
  • 111
0 votes
1 answer
403 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 ...
Ger Cas's user avatar
  • 149
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 ...
user922321's user avatar
1 vote
2 answers
1k views

How to automatically restart crond if it is not running?

I use cron job to monitor and restart other services if they are not running. But how to monitor/restart crond itself?
peter's user avatar
  • 403
0 votes
1 answer
569 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/...
quantCode's user avatar
  • 111
0 votes
1 answer
266 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 ...
Riyas Muhammed's user avatar
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 * * ...
AndroidHacker's user avatar
1 vote
0 answers
100 views

Rebooting a Linux server with best practices. Should I save what?

I would like to know what steps should I take before rebooting a Linux server to avoid losing the configuration. Example: I made a rule with iptables manually, did not add to rc.local. This won't ...
Marlon's user avatar
  • 399
0 votes
2 answers
354 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 ...
algorhythm's user avatar
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, ...
Joff's user avatar
  • 227
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 ...
Arnab Ghosh's user avatar
1 vote
1 answer
974 views

Many cron -f processes on unresponsive server

My Debian server had again become unresponsive and needed to be restartet (SSH login impossible, no longer transmitted log data to another server's MySQL Database, no new FTP connections possible, but ...
azren's user avatar
  • 111
0 votes
1 answer
388 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 ...
FabioEnne's user avatar
  • 133
0 votes
3 answers
74 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 ...
Abdessamad Idrissi's user avatar
0 votes
1 answer
466 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 ...
deadman36g's user avatar
2 votes
3 answers
10k views

Cron Command for twice a month on Sat @12am

I am wondering if someone can help with the simple but sometimes confusing commands regarding Cron jobs. I would like a cron job to run twice a month on a Saturdat @12am.
gdsnytech's user avatar
2 votes
1 answer
1k 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/...
Ghazanfar Mir's user avatar
1 vote
1 answer
63 views

Trigger a command upon every `crontab -e` edit

We are using a shared Linux server account where as everyone comes and edits the crontab. Usually we take a backup like this crontab -l > `date +\%Y-\%m-\%d\_\%H:\%M:\%S.txt` Is there an elegant ...
nehem's user avatar
  • 399
1 vote
1 answer
864 views

scheduling with cronjob to run the php file for only one time

How do I run the php file only once using the cron jobs. i.e., to schedule task to work on 20/06/2015 10:30:00 I tried something like this : 30 10 20 6 ? 2015 /usr/bin/php /path/to/my/file/...
Ahalya Hegde's user avatar
0 votes
1 answer
619 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&...
Pacerier's user avatar
  • 27.8k
10 votes
3 answers
59k views

cron expression for every hour starting from specific time

Every one hour (starting from "now") I am able to schedule using this cron expression (expression) using nodejs cron-job. But I need to set cron every one hour starting from a specific time. For ...
Devaraj C's user avatar
  • 201
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 ...
TobyG's user avatar
  • 143
0 votes
1 answer
917 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 ...
Khayam Gondal's user avatar
2 votes
2 answers
3k views

Why is this cronjob not working?

I have a ruby script in ~/custom_scripts/get_all_products.rb. I want it to run every night at 04:00. Here's what the cronjob in crontab -e looks like: MAILTO="<email>" 0 4 * * * ruby ~/...
narzero's user avatar
  • 419
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 ...
Lucas Bustamante's user avatar
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 ...
erdomester's user avatar
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 ...
thexpand's user avatar
  • 103
0 votes
1 answer
826 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, ...
Miss Phuong's user avatar
0 votes
1 answer
127 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 ...
Mihai's user avatar
  • 125
2 votes
1 answer
7k views

Cronjob for first day of month except sunday

I have such entry in my crontab: 0 0 1-2 * 1-6 It is correct that it would run at 00:00, 1st or 2nd day of the month from Monday to saturday? For example, if 1st day will be sunday then it would not ...
Alexander Kim's user avatar
-2 votes
2 answers
251 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 ...
user286205's user avatar
1 vote
1 answer
2k views

Running a cron job every five minutes

I need to run a cron for sync command. Is it as simple as this? */5 * * * * --sync Which I think will run the sync command every 5 minutes.
tumble's user avatar
  • 21
1 vote
1 answer
2k views

Enabling crontab logging on openSUSE

I am trying to enable the crontab log on openSUSE 11.3. I searched the web but couldn't find how to do it. I only find information about Ubuntu. Tried editing the /etc/rsyslog.d/remote.conf file but I ...
RegedUser00x's user avatar
1 vote
1 answer
194 views

Why this cronjob wont run

On debian squeeze as user root I add this cronjob with "crontab -e" */1 * * * * root /usr/sbin/ntpdate ptbtime1.ptb.de >> /var/log/ntpdate.log But this cronjob will not run, there is also ...
kockiren's user avatar
  • 462