Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Scheduling Tasks in SAS basic

Posts: 42

Scheduling Tasks in SAS basic

Hey - Anyone have any ideas on this please? In the data prep tool, I have a data query. I previously had a Schedule set up on it, and it showed up, worked, and was in the SAS management console in the Sceduling Manager, and I could see it etc. It worked fine. Now, we no longer need the data query to be scheduled, so removed it from data prep and just deleted it from under scheduling manager in the SAS MC. But, I found that it was still refreshing the data query, and it was a 15 minute refresh. 


Managed to get it to stop by deleting the query, making it again, creating a LASR table called something else, deleting the original LASR table, and renaming the new one to be the same as the old. It was fine for a couple of weeks, but now the schedule is running again, even though it's not scheduled! 


Anyone know how to kill/get rid of this ghost schedule please? 





Trusted Advisor
Posts: 1,839

Re: Scheduling Tasks in SAS basic

Hello @ScottJP,


is the re any change that you removed/deleted the schedule without previously un-scheduling it? That might explain your problem. 

Remove/delete will remove the schedule definition on your metadata, but not on your acual scheduler (DIP, Operating system, LSF or other).


To remove it from the scheduler you need to un-schedule it and then delete it. Or if you deleted it already as mentioned, you need to go to the scheduler itself, disable the schedule and finally delete the scheduled task (optional).

Posts: 42

Re: Scheduling Tasks in SAS basic

Posted in reply to JuanS_OCS

Hi there


Thanks very much for your reply, but I'm not sure what you mean. I've got SQL tables, which I've registered in the SAS Management Console as Libraries. 


We then create the LASR tables using the VA Data Preparation Tool, in which you can also Schedule the query execution (by clicking Schedule Query, funnily enough) ; this then creates the Schedule in SAS Management Console 9.4 in the Schedule Manager section, which works a treat. 


However, I guess I thought deleting the Schedule from the Schedule Manager in SAS Management Console 9.4 would delete the schedule - i.e. It allowed me to delete it, there's not a button that says 'Unschedule', so I just deleted it, thinking it would indeed stop/disappear/be gone/stop running.


Now, I can't see it, anywhere in SAS MC or in SAS VA Data Preparation Tool, but it continues to run the query every hour.


So, when you say, "go to the scheduler itself, disable the schedule and finally delete the scheduled task (optional)", what exactly do you mean? Where is this other scheduler please? (Note, I am NOT using Windows Task Scheduler or anything else other than SAS VA and SAS MC to schedule my queries). 





Posts: 586

Re: Scheduling Tasks in SAS basic

Visual Data Builder queries should be unscheduled only from within Visual Data Builder with the same account that was used to create the schedule. If you attempt to delete using a different user, or if you delete from SAS Management Console, you can get into a situation where the schedule no longer appears in any interface but still runs. This is more common on LINUX/UNIX systems.


You will need to delete the job(s) manually from the operating system. General steps are:

  • Log into the LINUX/UNIX system as the user who originally scheduled the job.
  • Run at -l to get a list of scheduled jobs. The first column is the job ID. The last column is the user who owns the job.
  • To look at the details of the job, run the following command where <jobid> is from the first column in the list output.

                       at -c <jobid>

  • To remove the job, submit

                      atrm <jobid>

  • After running this command, submit at -l one more time to make sure the job is gone.
Posts: 42

Re: Scheduling Tasks in SAS basic

Posted in reply to Madelyn_SAS

Hi - Thanks for the reply, but our server is Windows Server 2012 R2. 


The answer (for Windows servers anyways), if anyone else ever needs to know, is to go to X:\SAS94\Lev1\SASApp\SASEnvironment\SASCode\Jobs on your server, and delete the relevant .sas schedules therein. 


The problem is caused by the fact that when you delete a schedule from the scheduling manager, it doesn't unschedule the job itself (which is a bit crazy), so it ends up running in the background. 


So, make sure you unschedule flow, and then delete, otherwise you'll have to go that location and delete them from there. 






Ask a Question
Discussion stats
  • 4 replies
  • 3 in conversation