Thanks, Jesse!
20characters
Thanks, Jesse!
20characters
So sorry pulling this up, do we have a way to auto email reports at a specific time when using Virtual Workperiods?
Yes you can do that.
Could you give me a basic idea how to achieve that Jesse?
Trying to look around but still couldn’t find a way to trigger a rule to send the reports out at a specific time of a day. Need your advices everyone.
Had to delete my last posts because I misread.
Trigger
Save Report Action
Send Email Action
Rule (not mine, but should work) I convert mine to PDF
C:\Program Files (x86)\SambaPOS5\Reports\WP_[=Helper.GetUniqueString().substr(4,2)][=Helper.GetUniqueString().substr(6,2)]_[=Helper.GetUniqueString().substr(0,4)].xps
You could also look at Data Export for CSV format. Mine is based on:
Hi, thank you for your kindness Joe, the guide is detail. Yeah, I’m sending reports, not database backups. However, I understood just fine the general idea from your previous posts. I put the system into a test run tonight, will get back for the result on next days. Thank you so much!
FYI
As per JTRTech
On my server SambaPOS is running but not logged in, just on login screen.
Mapping the rule to the server only was to ensure the resulting script was only run once by the server avoiding chance of double running on other terminal (if that is possible or not am not sure but wanted to be safe).
As I understand it trigger is a global event so would trigger the rule on every machine open to triggers at that time.
I didn’t leave the Samba client open on the server last night so it didn’t send. Mapped it and left it open this morning. Worked fine.
I’m looking into XPS converter, do we need to put something like delay for few seconds between XPS creation - XPS converter - PDF sending email?
My converter seems not work correctly, I wonder if something like [=Helper.GetUniqueString().substr(4,2)] will work or not.
To add a delay you need to split the rule in to seperate rules for the steps and add execute automation command with a delay action and command name for next rule.
Yes you need to add a delay. Create an execute automate command action with a 3 second delay after creating the report. I added this later compared to my screenshots above.
Is the report creating successfully? If not, it’s likely security settings to the reports folder. Why would you want to write it to C:\ ?
I created a reports folder in the SambaPOS5 directory and I didn’t have to make any security changes.
Thanks, I’ll try to put the delay in today, still blurry how to do that. Actually, the reports are in C:\SambaPOS5\Reports\ and I made it shorter for screenshot purpose. Oh, and I can create XPS just fine, PDF convert not work through SambaPOS yet.
Okay, not home right now, but I’ll send my screens when I get in. Its generally:
I have mine running every two hours to watch for any issues right now.
Here’s how my is temporarily setup. I will obviously be setting my report to be execute prior to the close of my virtual work period and when the business is no longer executing orders.
Trigger (Set to your liking)
Action - Save Report to File
Action - Execute Automation Command
Rule - Save Report, Execute Automation Command
Filename:
C:\Program Files (x86)\SambaPOS5\Reports\WP_[=Helper.GetUniqueString().substr(4,2)][=Helper.GetUniqueString().substr(6,2)]_[=Helper.GetUniqueString().substr(0,4)].xps
Action - Start Process
Action - Send Email (set to your needs)
Rule - Automate Command Executed
Arguments:
“C:\Program Files (x86)\SambaPOS5\Reports\WP_[=Helper.GetUniqueString().substr(4,2)][=Helper.GetUniqueString().substr(6,2)][=Helper.GetUniqueString().substr(0,4)].xps" "C:\Program Files (x86)\SambaPOS5\Reports\WP[=Helper.GetUniqueString().substr(4,2)][=Helper.GetUniqueString().substr(6,2)]_[=Helper.GetUniqueString().substr(0,4)].pdf”
Filename:
C:\Program Files (x86)\SambaPOS5\Reports\WP_[=Helper.GetUniqueString().substr(4,2)][=Helper.GetUniqueString().substr(6,2)]_[=Helper.GetUniqueString().substr(0,4)].pdf
Thanks! I’m trying now. What is your Retry Count & Retry Minutes? Do we need them in our case?
I left these blank. I haven’t had any issues with my SMTP server. Worse case scenario I could VPN to the server and grab the report.
Keep in mind, if you’re trying to use GMail SMTP server you might need to grant additional access to devices. I had to do this with my network printer for scanning purposes.
See - Other Setup Options - Use the Gmail SMTP Server: https://support.google.com/a/answer/176600?hl=en
Can I have a look at your XPS to PDF batch file? I think I’m having issue there, still can’t convert XPS to PDF.
Yeah your batch file is diff. Remove the quotes from your change directory command and script home location values.
@echo off
clsset rSource=%1
set rTarget=%2set gxpsLocation=C:\Program Files (x86)\SambaPOS5\Reports\gxps\
:: Delete previous rTarget
if exist %rTarget% del %rTarget%C:
CD
CD %gxpsLocation%
gxpswin64.exe -sDEVICE=pdfwrite -sOutputFile=%rTarget% -dNOPAUSE %rSource%
It’s just so strange, I tried my best but could not find where the error is. It says the syntax of the command is incorrect.