472,983 Members | 2,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

Recurring Scheduled Job

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

Sep 13 '06 #1
3 1829
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.

Sep 13 '06 #2

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.

Sep 13 '06 #3
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.
Sep 14 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
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,...
5
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...
5
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...
6
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,...
1
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...
1
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). ...
0
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...
1
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...
0
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...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.