Questions tagged [cron]

34 questions
23
votes
3 answers

Date range query for past 24 hour in Mongo shell

I am setting a cron job to collect results from MongoDB database profiler. I'd like to collect results within a 24 hrs period. I plan to run mongo command with javascript. Question is, in Mongo shell, how do I write a query to find a date range from…
Howard Lee
  • 1,019
  • 3
  • 9
  • 15
5
votes
1 answer

Passwordless mysqldump via shell script in /etc/cron.daily

I'm aware that there are dozens of questions similar to this, but it seems none has a definitive answer to my problem, so that's why I'm posting this... I hope in the right place. The problem: I have a script placed in /etc/cron.daily that performs…
Vila
  • 223
  • 1
  • 6
5
votes
1 answer

Pg_cron crontab log issue

We're trying to configure periodic jobs in PostgreSQL. To do this, we have installed on Linux machine, with Postgres 9.6 running, the citusdata pg_cron project. System information: OS: Linux pg 4.4.0-72-generic #93-Ubuntu SMP PG: Postgres 9.6.3…
3
votes
2 answers

mysql backup password without root home

What's the best way to provide a MySql root password (~/.my.cnf) to cron job without root to have the home folder? the server I'm using is centos
Rait
  • 47
  • 5
3
votes
2 answers

"connection failed" error for pg_cron extension

Installed pg_cron and scheduled job, though there is connection error because job is not done and cron.job_run_details table shows connection failed error message. As doc says: Important: Internally, pg_cron uses libpq to open a new connection…
Oto Shavadze
  • 575
  • 1
  • 7
  • 15
2
votes
1 answer

Prevent postgres function of running more than 1 instance at the same time

DBMS: Postgres 9.3.4 OS: Debian 7 I have a plpgsql function that will be put in crontab to run every 15 minutes. The function should finish in about 8 minutes, but just in case it takes more than 15 minutes, it CAN'T run until the last execution has…
Ivan De Sousa Paz
  • 561
  • 2
  • 9
  • 16
2
votes
1 answer

Programming query execution Postgres

I need to execute update querys routinely over a Postgres table. Is it possible to program an automatic execution of the query, let's say, every day at 15:00 hs? The Postgres version is 9.5, I'm working on Windows 7.
2
votes
1 answer

Query to delete all rows which are not referenced in any other tables

Let's say i have a table called images. Images table is referenced in many other tables (movies, books, tv_series) through a foreign key. My question is if it is possible to write a query which will delete all orphaned rows without specifying exact…
Daniel G
  • 23
  • 4
2
votes
1 answer

CRON and RMAN Backups

We run RMAN backups via CRON jobs, but find the out-of-the-box emails with CRON to almost do what we want. I know we can channel the RMAN output to /dev/null so no email is sent, which for any successful run of RMAN is the desired outcome, but if…
John Eisbrener
  • 9,547
  • 6
  • 31
  • 65
1
vote
2 answers

Sync 8 tables of differents databases on same server

I will use eight wordpress websites and i need to sync ther wp-user tables so each single user can connect through all websites. All of these will be on the same server, using the same MySQL user, but they will each have their own database. The…
1
vote
0 answers

Refresh materialized view on Postgresql 11 on RDS

We are currently on Postgres 11.13 on AWS RDS. I am trying to create a materialized view that takes about 6-7 minutes to run. What is the best way to keep this MV mostly up to date? I was thinking of pg_cron but I believe that is only available on…
1
vote
0 answers

Replicating/Inserting 300M MYSQL records from 6 Remote Servers on Local using Unique Identifier

I have 6 remote servers that dial phone numbers daily. I have a total record count of over 300 million combined and now I want to procress on them. The table data looks like this using this query SELECT lead_id, entry_date, modify_date, …
Aun Zaidi
  • 111
  • 3
1
vote
1 answer

Set crontab backup job for Mariadb Databases from 1 remote server to another

I'm connecting to a Ubuntu Server remotely using SSH, where are x number of MariaDB databases. Now I want to set a crontab job to automatically create backup for all of them to another server where are stored back-ups from differents servers. How…
dan morcov
  • 25
  • 5
1
vote
4 answers

Integration: Keep two systems in sync

I have a GIS system with 40 tables, ranging from 1,000 to 60,000 rows per table. The tables are the system of record for assets in a municipality. The GIS assets in the tables get integrated to a Workorder Management System (WMS) on a weekly basis.…
User1974
  • 1,517
  • 25
  • 54
1
vote
0 answers

What's the best way to programatically have a MySQL DB update another MySQL DB

I am currently working for a service provider that offers Windows software for inventory control. This software connects to a MySQL DB on a dedicated server. So when this software is updated it sends the update to the DB. What I'd like to have…
lz430
  • 11
  • 1
1
2 3