SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Different outcomes when running JAL script normally/Debug

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Different outcomes when running JAL script normally/Debug
Author Message
SchedulerDude



Joined: 27 Apr 2015
Posts: 18
Country: Canada

Post Different outcomes when running JAL script normally/Debug Reply with quote
Hello

We are running a JAL script that deletes back up files on a regular basis. Because of the number of back up processes, we decided to create one JAL script job that does the does the following:
1) Read database - get Process Name, Folder name, File Prefix Name (the full file name has a date value - i.e. FileName-09-01-2016.xxx) , days to keep file
2) Identify if directory (folder name) exists - if folder does exist continue on, if folder does not exist - send error email and quit.
3) Substring the file name to get the date of the file back up - i.e. FileName-09-01-2016.xxx would result in file date value of 09-01-2016. Also take each part and create a date value (date data type)
4) Calculate date diff between file date (calculated in #3, and today)
5) Compare date diff value to days to keep file from database in #1 (above) if days calculated in #4 is less then days to keep file, then skip file, if days are greater, then process to delete file.
6) if delete file process, then check to see if file date is first of the month. If yes, then keep file, if no then delete
7) continue with all files located in directory.
8) when directory files have been processed, send email and move to next database record.

It appears that any processing done within local folders (i.e. C:\mydocument\backup\database\) works as intended. The concern comes in when we apply same process steps to a folder on the LAN we get different results when running normally vs. running in debug mode. In debug mode, the process picks up the file identifies it to be deleted or not and continues to the next file. In normal mode, the process always returns an email of no files deleted and I have confirmed files have not been deleted.

Any thoughts on what might be going on? I've tried adding waits in different places thinking may be the script is tripping up on itself. Also, did try to do a cd to change directories before doing direx command or before deleting a the file but the script always returned an error indicating an error occurred when changing directories.
Thu Sep 01, 2016 1:59 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
I guess when you say running normally you mean service mode. Are you aware that you cannot use network drive mapping setup for desktop with Windows services? You need to specify file path in UNC notation \\server\share\path. This would work in all modes.
Thu Sep 01, 2016 2:10 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.