# Save file locally scheduled

**URL:** <https://forum.inductiveautomation.com/t/save-file-locally-scheduled/59898>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [May 23, 2022, 9:02am UTC](https://forum.inductiveautomation.com/t/save-file-locally-scheduled/59898 "2022-05-23T09:02:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inken\_Kestler](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@Inken\_Kestler](https://forum.inductiveautomation.com/u/Inken_Kestler)\
**Post date:** [May 23, 2022, 9:02am UTC](https://forum.inductiveautomation.com/t/save-file-locally-scheduled/59898/1 "2022-05-23T09:02:01Z")

</div>

Hello,

I am hoping you can help me with my problem.  
I want to save some data from a database every night to a csv file.  
I can do this manually without problems. But if I want to run this automatically every night, I face the problem that I can only save on the gateway but not on my local PC.

Does anybody has an idea how I can solve this.  
I already tried to use reports (same problem with saving on local PC), use a time tag as trigger and use a timer in vision with property change script.

For your information:  
I use Ignition 8.1.10 and Windows 10.

I look forward to your solutions  
Inken

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [May 23, 2022, 9:25am UTC](https://forum.inductiveautomation.com/t/save-file-locally-scheduled/59898/2 "2022-05-23T09:25:12Z")

</div>

Tag script and gateway events script run in gateway, on server machine.  
Maybe a vision window script works.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 23, 2022, 9:31am UTC](https://forum.inductiveautomation.com/t/save-file-locally-scheduled/59898/3 "2022-05-23T09:31:14Z")

</div>

Do you need to do it in ignition ?  
You could try doing it outside, with whatever window’s equivalent to cron is…

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [May 23, 2022, 10:10am UTC](https://forum.inductiveautomation.com/t/save-file-locally-scheduled/59898/4 "2022-05-23T10:10:41Z")

</div>

Map the network drive of where you want the gateway to save it.

I prefer to have the gateway save on the gateway then use a script to copy it over, that way if the link is down the file can be retrieved from the gateway.

---

<div class="post-metadata">

**Author:** ![Inken\_Kestler](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@Inken\_Kestler](https://forum.inductiveautomation.com/u/Inken_Kestler)\
**Post date:** [May 25, 2022, 6:38am UTC](https://forum.inductiveautomation.com/t/save-file-locally-scheduled/59898/5 "2022-05-25T06:38:01Z")

</div>

thank you for your help. That could be a solution.  
I would prefer to have a solution in Ignition, so I have just one program instead od several individual components in different places.

But I suspect that’s currently not possible with Ignition.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 25, 2022, 8:39am UTC](https://forum.inductiveautomation.com/t/save-file-locally-scheduled/59898/6 "2022-05-25T08:39:24Z")

</div>

Have a look at [SqlBackupAndFtp](https://sqlbackupandftp.com/). I’ve found it very easy and reliable.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [May 25, 2022, 5:30pm UTC](https://forum.inductiveautomation.com/t/save-file-locally-scheduled/59898/7 "2022-05-25T17:30:21Z")

</div>

It can be done in Ignition.

First map your network drive:

[https://docs.inductiveautomation.com/display/DOC81/Mapping+a+Network+Drive](https://docs.inductiveautomation.com/display/DOC81/Mapping+a+Network+Drive)

Then use a gateway timer script to copy the files from the gateway to the other PC:

> [@Gateway scoped mapped drive](https://forum.inductiveautomation.com/t/gateway-scoped-mapped-drive/20483):
>
> I have a script to move files from one mapped drive to another, works fine in script console. Running as a gateway timer script, it doesn’t. I’ve changed the Ignition service to run under my domain user account that I’m logged into the SCADA workstation as. Looking at the post above, the 2nd part of the suggestion is to not use “:P\” but use explicit “\\computername\foldername\” However, the machine I am writing to (archive path) is not on the domain, this is why I went for a mapped drive …
