Questions tagged [cron]

cron is a task scheduler based on clock time that runs on Linux-based machines.

Filter by
Sorted by
Tagged with
0
votes
1answer
13 views

rsync in cron without ssh-agent?

I'm setting up backup server, that will connect to production server and fetch backup with rsync via cron task. I have user on my backup server, I created public key and I can log with ssh to ...
0
votes
1answer
23 views

Python script using Crontab

I've written a python script that will check my roster for work (which is in google sheets), take some relevant details, place them in an email and send them to me. When I run this script manually ...
0
votes
0answers
13 views

How to imitate UNIX “daemon”-processes using task scheduler in Windows platform?

I don't know the exact formulation anymore, but in UNIX the following crontab entry makes sure that a process always is running (and gets restarted in case it stops), which makes the process behave ...
0
votes
1answer
16 views

Why does VI not run when called from cron?

I can run this command perfectly at the command line and it works as expected. /usr/bin/vi /tmp/test.txt -c ":%s/test/production/g" -c ":wq" However the same command run from a ...
0
votes
0answers
34 views

Copying a file while its being written to (in Linux)

I am in a year-long Twitter research project, and I collect tweets via Twitters API and Twarc. In short, this writes a new tweet as a new line to one specified file, roughly one per second at night, ...
2
votes
0answers
38 views

Having all systemd timers mail to root on error

cron sends an email to the crontab owner on job error. How can i have systemd do the same when it runs a timer? Note: I am not looking for a recipe for adding email notification to a specific service. ...
0
votes
2answers
19 views

Run terminal command on boot using crontab

I have a server and on every boot, I have to enter npm run dev on the terminal so Node.js server starts. How do I use crontab to do it for me on every boot? I want something like this; @reboot echo &...
0
votes
0answers
34 views

Run a shell script everyday even if mac is asleep at the time

so I have a bash script that I want to run every weekday at 3 and I used crontab already it only works if I happen to be on my computer during the time. I need the script to run when I open my laptop ...
3
votes
1answer
46 views

Sudo crontab not executing

I'm running Ubuntu 20.04 and I set up my sudo crontab but the lines don't seem to be executing (e.g. my backup script is supposed to email me after completion but it never does, and its logs show it ...
0
votes
0answers
16 views

Trying to create a cron job to run journalctl to run a job that is to place a text file under another user's home folder, getting permission denied

So I'm doing some homework and my 18+ hours of research has not gotten me very far. My homework activity is asking me to create a cronjob using journalctl to perform a daily task. But I'm running on ...
0
votes
1answer
168 views

Running a Python script in the background on macOS Big Sur

I'd like to use a cron job to run a task which involves a python script. The bash script for the task looks about like: #!/bin/bash ... python ./script.py & ... Which is called via crontab like: ...
3
votes
0answers
48 views

certbot-auto fails to install automatic renewal?

I am using kernel 3.10 on CentOS 7. I have successfully installed CertBot 1.10.1 using alternative installation instructions as certbot-auto. Running certbot-auto successfully generated certificates ...
1
vote
0answers
13 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 ...
0
votes
0answers
24 views

Can't install anything on my router shell

I know this might be a noob question or maybe not. I have an ssh shell with my router and I want to make a cronjob for the router to update the IP address of a DDNS provider(Dynu.com). I tried the ...
0
votes
0answers
67 views

How to create a persistent cronjob on an Ubiquiti Edgerouter-X so its still there after a firmware update

We have tens of Ubiquiti Edgerouter-X's on active on customer locations. They among other things responsible for pinging an IP each minute. This is done by a cronjob (set with crontab -e) and works ...
1
vote
0answers
16 views

Cron a database dump on an external SFTP server

I have a command to dump a database in a local server, and want a daily backup of that database in an external SFTP location. I checked out the scp command and it works smoothly, now I need (maybe ...
0
votes
1answer
27 views

Moreutils' Chronic reports everything in STDOUT, but only when run in cron

I prepared the following script to test chronic & cron: echo "normal out" echo "error out" >&2 exit 0 When I run it on normal shell with chronic -ev, output is as ...
0
votes
0answers
36 views

why does this anacron job run hourly, not daily?

I'm running zulip on a virtual private server, and have created a script backup-zulip on my laptop (with ubuntu 20.04) to back up zulip via ssh. I want to run this script daily, so I put the line @...
0
votes
1answer
41 views

Logrotate running at wrong hour/time

I have the following entry in my /etc/crontab file to ensure that daily cronjobs run at 4:25 AM. This is the only entry for daily inside this file: 25 4 * * * root test -x /usr/sbin/anacron || ...
0
votes
1answer
59 views

Cron job fails to run NodeJS script

I have a cron job for which I want to log output. The cron file (crontab -e) is: 0 7 * * * node $HOME/server/task.js >> $HOME/server/log.txt The cron task is called: $ grep CRON /var/log/syslog ...
1
vote
1answer
32 views

PHP cron job — that worked before — suddenly stopped working when Plesk scheduled tasks

I am creating the cronjob from my Plesk control panel. The cron is like so: 0 0,3,6,9,12,15,18,21 * * * /usr/bin/php httpdocs/sources/australia.php >> /var/www/vhosts/website-here/logs/topfbk....
0
votes
0answers
37 views

How to run crond on php-fpm docker container based on Alpine

So, I am playing with this for a while now and still can't figure out the solution. I need to run a php-fpm in docker, I also want to run crond in same container. Few assumptions: crond needs to run ...
0
votes
1answer
23 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
1answer
77 views

Logrotate status file update from different crone jobs

I have several scripts in /etc/logrotate.d/ all are included in /etc/logrotate.conf and crone job that runs: /usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf daily. But I ...
1
vote
0answers
71 views

Why can't I execute shell script via crontab?

I have this script shell1.sh ubicate in /home/documents/files, the script is for the creation of users on Linux, so it asks for some information and later creates the user. I want it to run for every ...
0
votes
0answers
15 views

Password protection with automatic app restart on reboot in Linux (systemd vs. crontab)

I have an app which I want to start if for some reason the server reboots. I pass some sensitive data (like passwords) to it by setting them in environment variables ( export pass=secret) which the ...
0
votes
1answer
9 views

System crontab won't run for certain user on Centos 7

I have a super simple system crontab to run as a specific user. For a user that can login to a Gnome session it works fine. For another user that I use just for system tasks, it will not run. This is ...
1
vote
1answer
461 views

Does CRON execute scripts similarly to

Does CRON execute scripts similarly to how a user is using an open session and sitting at the terminal for scripts that require such execution. OR Does CRON require the use of tmux and screen?
0
votes
0answers
34 views

Do CRON executed scripts require tmux?

I have several scripts written in Python and Bash that need to be ran in a live session by the user or Tmux. One of my scripts requires input when executed and the other (python) does not. My ...
0
votes
2answers
45 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 user1@192.168.5.54:/tmp/bkp*tar.gz /home/...
1
vote
0answers
15 views

Cron job - every minute between 8:30 and 9:00

I want to run a script 8:30 to 4 each day. Currently I have this to handle the 9 to 4. */1 9-15 ? * MON-FRI * I think I discovered that the 15 is inclusive, so this will run up to 15:59 Can some ...
2
votes
0answers
31 views

How do I stop SpamAssassin cron job from mailing me errors?

I have a cron job for SpamAssassin to update, but it keeps sending me the errors. How can I stop the SpamAssasin job from emailing me? This is the email that I get: Subject: Cron <root@kizbit> /...
0
votes
1answer
111 views

How do I edit the crontab for SpamAssassin updates on CentOS 6?

I receive this email daily: From: Cron Daemon Subject: Cron <root@server> /usr/share/spamassassin/sa-update.cron 2>&1 | tee -a /var/log/sa-update.log UTF-16 surrogate 0xd800 at /usr/...
1
vote
1answer
49 views

How can I configure a Linux backup server such that the hard drives, including the system drive, are powered off when not in use?

I'm currently working on setting up a backup server for my NAS. This server is to take an incremental backup of my NAS every 24 hours, which should only take a few minutes. Yet, I want 24/7 remote ...
1
vote
2answers
318 views

Init.d / crontab does not execute code on system start Ubuntu 20.04 Unix

As Unix Ubuntu does not support a natural scrolling and tap touchpad click I created simple script for enabling those options. As I got tired of executing it every time I reboot the laptop I wanted to ...
0
votes
1answer
55 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.
0
votes
1answer
89 views

Spotify cache now at 11gb, how to delete with Crontab?

I am aware that Spotify downloads songs and keeps them on my hard disk rather than keep re-streaming them. However, my Spotify cache is now up to 11gb and I’d like to use crontab to delete it. I ...
0
votes
0answers
94 views

Docker container with delayed disk I/O (cache)

I'm using docker-compose to run a non-essential container that generates some logs. It is not a lot of data, and the data is not important to me. Is it possible to have the docker-container cache/...
1
vote
1answer
56 views

Looks like cron spawns a shell which in turn spawns a script; how can I get rid of the intermediate shell?

The OS is CentOS 7. I have a rather basic understanding of crontab and crond. I created a crontab entry using crontab -e: */5 * * * * /root/script.sh > /dev/null 2>&1 The script detects if ...
0
votes
1answer
52 views

Cron job doesn't work

I have a shell script which I want to run as a cron-job every 10 minutes. I'm adding the job as follows crontab -e */10 * * * * /bin/sh /home/tool/fill_data/run_script.sh And the run_script.sh ...
1
vote
2answers
93 views

Cronjob stuck in a reboot loop

I have added a rather simple cronjob to my machine to perform a daily reboot at a given time (in this example 06:30) 30 6 * * * reboot I may be misunderstanding something completely here, but the ...
1
vote
1answer
576 views

How to log the output from an rsync backup which runs from a script using crontab?

I would like to log all the output that is generated by rsync; the output that I see when I run the script myself in terminal. I would prefer this logging to occur from within my script. Here is my ...
0
votes
0answers
140 views

Magento 2 Captcha Images Not Deleting (thousands of files using space)

We've got a Magento store running on version 2.2.5. The captcha images that are generated in /pub/media/captcha do not seem to be automatically deleting once expired. I know that the ...
1
vote
0answers
88 views

Send email once per day using pm2 and nodemailer

We are using a Ubuntu 18.04 server with pm2 to schedule the launch of a node.js backend on startup and have a working nodemailer script that sends an email to our team members with the state of some ...
0
votes
0answers
8 views

Crontab logs: prepend content and automatically delete old entries

I have been making some automated scripts on a remote debain-based server with cron. Each script has lines that log specific events, for example echo $(date) >> my/log/file.txt echo "Script ...
0
votes
1answer
66 views

Disable warning from mdadm for “degraded” RAID1 with missing drive

I recently had a server outage due to a failed drive. Because of that I set up the server with a new SSD in RAID1 this time but until I managed to get another SSD drive the mdadm-based RAID1 runs with ...
0
votes
0answers
56 views

Mule 4 Cron Scheduler to schedule on every wednesday and last day of the month

Mule 4 Cron Scheduler to schedule on every wednesday and last day of the month. 0 00 06 ? * WED : this one will run the job on every wednesday 0 55 23 L * ? : This one will run on last day of every ...
1
vote
1answer
270 views

Cron scheduled backup script not working or writing to log file

I have a duplicity backup script set to run once per day through the root cron tab. I set it up like this: sudo crontab -e -u root and added the line: 00 03 * * * root /home/[myusername]/...
0
votes
0answers
24 views

How I do a Cron job to add “Seen” flag to all MBOX emails in Trash?

Im having some difficulties with preventing emails in "Trash" to have a "unread" flag (which causes a stockpile of notifications on my phone). I have in dovecot managed, to add the "\Seen" flag to ...
0
votes
0answers
14 views

Acessing and transferring files from a FTP server to my ftp server through cron file

I have a FTP Server that uses Cron to automate tasks and I would like to use it to access another ftp server, get a file that starts with 26 and have an extension .csv, transfer to my FTP I am running ...

1
2 3 4 5
17