Is it possible to display when a scheduled job is next due to run in
either a view or a table?
If so, how?
thanks
Bryan 3 1841
This is for SQL 2000. Running msdb..sp_help_job will display the
information. I dug through the msdb..sp_help_jobschedule and put the
following query together:
select name
,cast(left(cast(next_run_date as varchar),4)+'-'+
substring(cast(next_run_date as
varchar),5,2)+'-'+right(cast(next_run_date as varchar),2) +' '+
left(cast(next_run_time as varchar),2)+':'+substring(cast(next_run_time
as varchar),3,2)+':'+right(cast(next_run_time as varchar),2) as
datetime) "Next_Run"
from msdb..sysjobschedules
Converting the next_run_date and next_run_time columns got kind of
messy, but it works.
treschau...@yahoo.com wrote:
This is for SQL 2000. Running msdb..sp_help_job will display the
information. I dug through the msdb..sp_help_jobschedule and put the
following query together:
select name
,cast(left(cast(next_run_date as varchar),4)+'-'+
substring(cast(next_run_date as
varchar),5,2)+'-'+right(cast(next_run_date as varchar),2) +' '+
left(cast(next_run_time as varchar),2)+':'+substring(cast(next_run_time
as varchar),3,2)+':'+right(cast(next_run_time as varchar),2) as
datetime) "Next_Run"
from msdb..sysjobschedules
Converting the next_run_date and next_run_time columns got kind of
messy, but it works.
This is not as good I hope. If the job isn't going to run until
tomorrow the next_run_date and next_run_time columns are zero.
I thought you had it there :) Its a doozy I guesss
thanks for trying anyway
Bryan tr*********@yahoo.com wrote:
treschau...@yahoo.com wrote:
This is for SQL 2000. Running msdb..sp_help_job will display the
information. I dug through the msdb..sp_help_jobschedule and put the
following query together:
select name
,cast(left(cast(next_run_date as varchar),4)+'-'+
substring(cast(next_run_date as
varchar),5,2)+'-'+right(cast(next_run_date as varchar),2) +' '+
left(cast(next_run_time as varchar),2)+':'+substring(cast(next_run_time
as varchar),3,2)+':'+right(cast(next_run_time as varchar),2) as
datetime) "Next_Run"
from msdb..sysjobschedules
Converting the next_run_date and next_run_time columns got kind of
messy, but it works.
This is not as good I hope. If the job isn't going to run until
tomorrow the next_run_date and next_run_time columns are zero.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: A. Lovhaug |
last post by:
I have a console application built in the .NET Framework.
This application basically executes an XCopy based on
parameters that I pass to it. I use it for creating
scripts for backing up folders,...
|
by: Shabam |
last post by:
I'm having a calendar feature developed whereby users can add recurring
events. These recurring events can have start and end dates, meaning they
will recur only within a date range. For...
|
by: gil |
last post by:
I initially tried building a coded system where numbers 1 through 10
referenced a certain type of recurring appointment, and would then call a
specific function for each, but as more appointments...
|
by: John Bowman |
last post by:
Hi,
I have a C# app that needs to launch the "Add Scheduled Tasks" wizard found
in the control panel "Scheduled Tasks" applet. I realize that this "applet"
really just opens the tasks folder,...
|
by: steve |
last post by:
Hi All
I am writing a program for a gymnasium for membership control
It is the first time I have had to deal with appointment diaries and I want
to know the best way to store recurring...
|
by: satelite |
last post by:
Hello,
I am writing an exe that is intended to be run via a scheduled task.
However, I also need the flexibility to have users run the scheduled task
manually (right click task and select run). ...
|
by: Paulson |
last post by:
Dear Freinds
I want to make a program that acts as a reminder for the
users.I need to open up the Scheduled task wizard programmatically.If you
type Tasks in the run command the Tasks...
|
by: TC |
last post by:
Hi, I have an app that is going to require recurring diary entries, it's a
relatively simple app but I have no idea how to go about the recurring entry
side of things.
The functionality needs to...
|
by: =?Utf-8?B?TWVlbWEgSnVkeQ==?= |
last post by:
I have a Verizon Palm Treo 755p and use Outlook 2002 on my new HP Pavilion
(Vista 64-bit). When I was syncing on my old XP PC, everything worked fine.
On the Vista PC, when I finally got it to...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |