Questions tagged [scheduled-tasks]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
41
votes
3answers
55k views

How to run recurring tasks on Postgresql without an external cron-like tool?

I would like to call a stored procedure on a regular basis. On Oracle, I would create a job for this. I have found that Postgresql can mimic this well by using an external tool (cron etc) and PgAgent. ...
13
votes
3answers
13k views

Automatically execute query in MS SQL Studio every hour

I support an application in a big enterprise, one of my roles is to clean-up data. There is a query I need to execute every hour, and I would like to automate it. Due to organization policies, I can't ...
13
votes
4answers
4k views

I'm using the SQL Server Agent to schedule even non-database tasks - is this a bad idea?

Since I'm a DBA (and in many cases, the de-facto sysadmin), SQL Server is installed on pretty much every server I have to work with regularly. I realized recently that I've been using the SQL Agent as ...
5
votes
1answer
823 views

How to schedule PostgreSQL replication?

I was reading postgresql replications solution but, even I just starting understaning how it works, another doubt has arrisen. I'll be using postgres internal replication solution but as far as I ...
5
votes
1answer
1k views

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....
4
votes
3answers
45k views

How to automatically execute a stored procedure every day at a particular time?

Can you please help me how to execute a stored procedure automatically in SQL database without any transaction in SQL? I want to execute on particular fix time.
4
votes
1answer
196 views

Why the job's next_run_time is wrong?

I got an issue regarding job stats. So I have a job with the following schedule: Occurs every day every 5 minute(s) between 12:00:00 AM and 11:59:59 PM. Schedule will be used starting on 12/13/2017. ...
3
votes
2answers
16k views

Insufficient disk space in Filegroup

One of my jobs is failing and it shows below message. Error: Could not allocate a new page for database 'Reporting' because of insufficient disk space in Filegroup ‘PRIMARY’. Create the necessary ...
3
votes
2answers
474 views

Scheduling queries to run when sql server is not busy

Is it possible to schedule some queries not for specific times but to run when sql server is not busy? Is there any way to calculate the business of the sql server?
2
votes
2answers
57 views

How to find a SQL Job details in Production environment?

There is a stored procedure being executed daily which inserts a record in a specific table. Our Production database servers has lot of SQL jobs scheduled to run daily at different intervals. How to ...
2
votes
2answers
7k views

Running a query within a scheduled job

I am looking at running the following query within a scheduled job weekly: Select TOP 10 s.database_name, m.physical_device_name, CAST(DATEDIFF(second, s.backup_start_date,s....
2
votes
1answer
920 views

what does that mean? COMMAND [PeriodicTaskRunner] task: UnusedLockCleaner took: 273ms

With mloginfo I found a strange log entry. Didn't find anything about it in MongoDB docs and other related sites. $ mloginfo mongodb.log --distinct source: mongodb.log host: example ...
2
votes
2answers
48 views

Generating Backups of Databases

I would like to create a backup of four databases on one SQL Server 2000 instance at the exact same moment in time. How can I achieve it? Creating different jobs with the same schedule date and ...
2
votes
3answers
4k views

Ways to Schedule Rman backups

I am using oracle 11g database in windows platform. Also, my db is in archivelog mode and I am taking daily RMAN backups. Now, I need to schedule my Rman backups on daily and weekly basis. I read ...
2
votes
1answer
7k views

SSIS Package Validation Error when Executed From Windows Task Scheduler

I have deployed my SSIS package using the project deployment model to the SSIS catalog and experience a strange validation error when I try to execute the package. I believe this is due to a ...
2
votes
1answer
32 views

Schedule database backup question

Good day. This may be a stupid question and you can give me a stupid answer if you need to. I know you can schedule a task to backup a sql database at logon, shutdown, specific time, etc. But What I ...
2
votes
0answers
171 views

Scheduling a task to run after a SQL SERVER 2012 executes a different set of scripts?

Im working on a project for a job I am interning for. I've had a few months of database design. I am still learning all the techniques. I am currently trying to schedule a console app to run every ...
1
vote
1answer
3k views

Automate backup using Windows Task Scheduler

I want to run an automatic backup of SQL Server 2012 Express using Windows Task Scheduler. I have 3 user databases. I want to backup all 3 user databases through a single stored procedure and a ...
1
vote
1answer
7k views

Scheduled event did not start when expected

I have created one event schedule which looks like this: mysql> show create event event1 -> ; +--------+----------+-----------+---------------------------------------------------------------...
1
vote
1answer
66 views

executing a stored procedure on a monthly schedule

I'm looking to create an invoicing procedure that executes automatically once a month. The procedure name is INVOICE_PROC. I have tried to use a trigger to execute it but I can't get it to work. ...
1
vote
2answers
125 views

Run shell script on Oracle 11g

I have an oracle database: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production PL/SQL Release 11.2.0.1.0 - Production "CORE 11.2.0.1.0 Production" TNS for Linux: Version 11.2.0.1.0 - ...
1
vote
2answers
1k views

How to stop the SQL Server Agent Job Scheduler with T-SQL?

I have a job that I manually start in coordinated time periods that does a bunch of heavy lifting (mostly restoring backups and configuring for a different server) There are several jobs scheduled to ...
1
vote
1answer
43 views

Serializability schedules: can someone help me understand it?

I am struggling with the Databases courses I have, so I am trying to find answer to my question. This has been asked: Add the appropriate locks to enforce serializability on the following ...
1
vote
1answer
453 views

Most efficient table storage for determining recurrence

What is the most optimal table structure to store schedules / recurrence definitions so that we can efficiently query it for all events that will occur within a date range (min:1 max:32 days)? My ...
1
vote
1answer
191 views

Run a stored procedure only the last 3 days in a month

How can I run a stored procedure only the last 3 days of a month using a T-SQL script?
1
vote
2answers
33 views

SSIS connection used based on passed value

I have an SSIS package that populates a reporting warehouse from a live and test environment. Currently the package has each step duplicated as the source connection changes between live and test. ...
1
vote
1answer
214 views

Create a job from dbms_scheduler with stream redirection?

I want to create a simple job who have to execute this shell command: echo some_text > some_file The attributes some_text and some_file can change between two calls to run_job so I need to use ...
1
vote
2answers
942 views

Is there any way to Rebuild (and Reorganize) the indexes automatically?

I have created some non-clustered index on my tables in SQL Server 2014. Is there any way to Rebuild (and Reorganize) the indexes automatically? I mean is it possible to schedule them to be built ...
1
vote
1answer
63 views

Backup a MySQL database -options

I'm relatively new to database driven sites. In order to backup a database I use phpMyAdmin's Export function from the server and download the output to my computer. That works, but it requires me to ...
1
vote
3answers
581 views

Aggregating data - Getting data inserted after last time query was run

On a SQL Server 2008 R2 DB, I'm running an aggregation query every hour or so, on data that's being constantly inserted into a table, and what I'd like to do is pull all the "new" records that were ...
1
vote
1answer
923 views

pg_dump fails to create a backup when running from System User in Windows Task Scheduler

I am trying to run a pg_dump through a scheduled task in windows. I have two batch files. One creates the task. The other one runs the pg_dump. Even though the pg_dump works with the current user with ...
1
vote
0answers
96 views

Bypass stored procedure execution CPU consumption

We are using Microsoft SQL Server Agent Jobs to execute stored procedures on the other database systems (like MySQL or Oracle). Usually we run procedures via linked servers (over OLEDB and ODBC ...
0
votes
1answer
79 views

How can I run a pgAgent job every 10 second?

I have a PostgreSQL 11.3 Database. I installed pgAgent for creating jobs. Now I want to run my job every 10 second, but in GUI there is possibility to write with precision of minutes, not with ...
0
votes
2answers
249 views

Stop long running scheduled job

I need to launch a scheduled job at 12 o'clock at night and keep this job running for a period of 8 hours. What happens now is that the job is running for more than 12 hours and I really need to avoid ...
0
votes
2answers
33 views

Oracle 12c and Jobs running one hour apart after changing time for hourly use

I have an Oracle 12c database in which I have detected that the scheduled jobs are running one hour apart after the change of time on the server, checking in the database I see that the SYSTIMESTAMP ...
0
votes
1answer
30 views

How to create a CSV file which imports data from an Access Database on a Weekly Schedule?

I have very little experience in database management but have come across a problem I am unable to find a solution to online. I currently have access to a database which is updated in real time with ...
0
votes
1answer
425 views

Always On: SQL Agent can still run stored proc on inactive server

We have the AO Clustering - HA&DR Hybrid configuration. Out of a dozen databases only this one database/application is encountering this. The problem is that we have a SQL Agent Job scheduled to ...
0
votes
1answer
38 views

Command runs fine in elevated command prompt, but fails when run in a Windows Task Scheduler task

Here's my predicament: The version on the server is SQL Server Express. And no, we cannot use any other version. (Long story, but: vendor will not allow without $ome...) From 1, you can deduct that ...
0
votes
1answer
66 views

MySQL schedular every day in a time periode every hour

This schedular i made doesn't work how i would like it to work. The idea is that it will run every day in a time periode from 06:15:00 till 23:59:59 and in that only periode run every hour That ...
0
votes
1answer
18 views

Regularly clone/backup 2 MySQL databases unidirectionally from PC to Laptop both running Windows

I have a PC running Windows XP with a custom ERP system and MySQL Server 4.x (A) and a Laptop running Windows 10, same MySQL 4.x and same custom ERP (B). I'm afraid I can't upgrade PC nor MySQL, etc. ...
0
votes
0answers
170 views

Not able to run mongorestore job from schedular task on windows

I have a Shell Script under which restore command is mentioned for restoring the DB from target folder. My File name will be mongorestore.sh NOTE: Dump data location will be E:Backup/test #!/bin/...
0
votes
1answer
631 views

how to find out the next time a job is scheduled to run in sql - in real time and even if the job has never been run before

I have a very similar question here but the problem with that question/ answer is that it does not work for all situations. for example, for the jobs that I have just created and have not been run as ...
0
votes
0answers
391 views

Is it possible to configure exceptions for SQL Server Agent tasks?

I use SQL Agents tasks to execute my backup, maintenance & ETL tasks. IT would like to have a regular maintenance window to apply server patches. They're suggesting the 3rd Tuesday of every month ...
0
votes
0answers
24 views

SQL Server Job does not execute when scheduled, but does execute manually, how do I get it to run as scheduled? [duplicate]

I am running SQL Server 2014 SP 1 CU 5. The job did work in the past. The schedule is enabled. The account it is running under is an ADS account which has sysadmin rights and has delete rights to the ...
0
votes
0answers
855 views

pgAgent does not run

I referred this to set up a scheduled job and did everything as it mentioned(ran the pgagent.sql as well) I need a very simple task to run periodically. In the 'Definition' tab in the steps, few ...