All Questions
1,118
questions
0
votes
1
answer
18
views
cron job to trigger something on a remote webserver
I have a webserver with ssh access and the possibility to enter a cron job there.
I have another second webserver, where I just can create web pages to do some work (via php) when they are called from ...
-1
votes
2
answers
138
views
Problem in using scp with sshpass in Linux Shell
When I type the following command in Putty connected to Server A.
My file is copied from Server A to Server B.
sshpass -p 'myPass' scp userB@serverB_ip:/file.txt /home/XXXXXX.txt
However, it does not ...
2
votes
1
answer
72
views
How to use a pattern-list within a longer path name in a cronjob?
Every day I need to move four files from one folder to a subfolder. On May 26th, these are the files from yesterday:
changes-ar-240525.txt
changes-dp-240525.txt
planned-ar-240525.txt
planned-dp-240505....
0
votes
1
answer
25
views
Switch user before running cmd ubuntu [duplicate]
I'm trying to run a cron job in ubuntu server to backup my database every day.
so Im using this cmd:
sudo -i -u postgres && pg_dump -Fc DbName > DbName_backup.dump && ... && ...
0
votes
1
answer
108
views
Track the expdp task status that is run in cronjob
I'm currently working with housekeeping solution development for my team system.
The overall solution works as I expect. But when I check the log file, it shows that if I consecutively run expdp (...
0
votes
0
answers
70
views
Bash Script to Delete Backup Files Older than 7 Days From a Google Drive Folder
I created an automatic backup of my files from database to google drive and I used cron job to schedule it to execute every day. Now I want to auto delete these files that are older than a week from ...
0
votes
1
answer
52
views
Error in executing gcloud commands in bash script in crontab
I have written a bash script that uses
gcloud command to activate service account and
gsutil command to move files to GCS bucket.
When I run the script using bash command, it executes well.But when I ...
2
votes
3
answers
63
views
Bash script (cron job?) to process files uploaded to a directory?
Let's say I have a tool called jpeg2txt. I need to write a bash script that:
Constantly checks if there are any new files (JPEGs) in source directory
Launches jpeg2txt on them, and writes the results ...
0
votes
1
answer
36
views
Raspberry Pi transmitting CSV files using scp not working when in crontab?
So i am trying to send 2 CSV files from one Pi to another Pi for a project. I have done this and it works. shell code below:
called fileTX.sh
#!/bin/bash
password="pword"
username="pi&...
1
vote
1
answer
112
views
Why can't my Linux shell program sometimes find a file it just created?
I have written a Linux shell program to keep my server information updated. It works by creating a new file with the newest server information and comparing it with the old one. However, the program ...
0
votes
1
answer
485
views
crontab command return codes
When I run crontab -r, I get a return code equal to 1. It's actually working, it's deleting the crontab as it should. So I wonder if there is a summary of the return codes of crontab. I couldn't find ...
0
votes
0
answers
30
views
Run php script in cron, with lockf addition
I had a cronjob running every minute through crontab with the following command:
* * * * * lockf -k -s -t0 ~/path/to/server.php.lock curl "https://url/to/server.php"
However I need to avoid ...
0
votes
1
answer
96
views
Gnuplot: plot not updated
in a script bash, here is what I do:
Every 3 minutes, I create binary data for one minute to get a waterfall. The following command creates two files: plot.met and plot.bin.
rtl_power_fftw -f ...
1
vote
1
answer
178
views
Cron job doesn't have permission to access file, but shell script does
I've put together a shell script that I want executed on a schedule. Among other things, it reads a SQLite DB file and does some operations with that data. I'm having trouble getting the permissions ...
0
votes
1
answer
207
views
Cron job for Scrapy Project within Docker container fails to connect to PostgresSQL database in different Docker container
So 2 of my docker containers for this project are a Python image running a Scrapy project and a Postgres image.
docker-compose.yml
version: '3.8'
services:
app:
container_name: app
build:
...