Fix script or Scheduled Job?

Kohei4
Giga Expert

Hello

I would like to know which is better to use regarding the Fix script function and Scheduled Job in my situation.

1. I need to delete multiplue records which is accidentaly created
2. The record deletion is planed once but may be needed in the future -> So I don't want to use the background script
3. During execution, I would like to show messages of the number of deleted records.

Docs is saying that Fix script is for application install or upgrade. So, I am worrying that it might run automatically and Schedule Job is better.

5 REPLIES 5

Sagar Pagar
Tera Patron

Hi,

Yes. Fix script is better solution.

I would suggest to go with Fix script. Also, if required you can add the log statements.

Next time you  have to just update the query and the comments in script and execute it.

 

Thanks,

Sagar Pagar

The world works with ServiceNow

MrMuhammad
Giga Sage

Hi,

Fix Script: On demand execution which means it doesn't trigger it self and you need to execute this when needed.

Scheduled Job: Execute based on given frequency without manual intervention. It is meant for routing executions

Fix script best fits your requirements as it will give you the ability to execute in the future only when needed. 

Regards,

Muhammad

Regards,
Muhammad

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

You can use scheduled job or fix script. Both can be executed on-demand by admins.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

That's true but I think it kills the purpose of scheduled jobs. We have fix scripts/background scripts for that. 

I know there are use cases where we can execute scheduled jobs via scripts or if an unplanned execution is required but when we are sure that the execution would be on demand then a scheduled job is not a good option as per my understanding. Just a thought!

Regards,
Muhammad