Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Question about sq_update_jobschedule

Author  Topic 

kakashi
Starting Member

7 Posts

Posted - 2006-03-16 : 19:34:31
hey guys,
i'm trying to run sq_update_jobschedule and my code looks something like this:

USE msdb
EXEC sp_update_jobschedule @job_name = 'Export_Header',
@name = 'Export_Header',
@Freq_type = 8,
@Freq_interval = 2

This works good, however i want it to run on monday and friday.

According to the web, it says:

freq_interval is one or more of the following (ORed together):
1 = Sunday
2 = Monday
4 = Tuesday
8 = Wednesday
16 = Thursday
32 = Friday
64 = Saturday
(ref. http://doc.ddart.net/mssql/sql70/sp_ua-uz_6.htm)

so i tried something like:
USE msdb
EXEC sp_update_jobschedule @job_name = 'Export_Header',
@name = 'Export_Header',
@Freq_type = 8,
@Freq_interval = 2,
@Freq_interval = 32

but it shows error. does anyone know how to set more than 1 of the weekday into the store procedure?

Thank you


EDIT: Fixed some Syntex Error

kakashi
Starting Member

7 Posts

Posted - 2006-03-16 : 19:46:36
okay i got it, i used the bit comparsion

so
monday and friday = 2 & 32 = 34
Tuesday and Sunday = 4 & 1 = 5

:)
Go to Top of Page
   

- Advertisement -