Could your problem relate to security? in the CLI, you're logged in as yourself. In what user context does the CRON job run? And does it have rights on the machine because the tabcmd by default saves a cookie token somewhere for the running user. If you want, you can try to add --no-cookie and see if this helps too. tabcmd Commands
Jeff Strauss thank you Jeff. I tried multiple variations when adding the --no-cookie global parameter in my line, but always get
===== Logging in as user '<linuxuser>' since no --username flag was given
*** Cannot sign in because of missing arguments: --server
Where should i put the --no-cookie?
Try getting rid of the tabcmd login altogether. And instead, put all the required parameters as part of the export itself. Something like this:
tabcmd export "xxx/Dashboard" --server xxx:80 --user admin --password xxx --no-cookie --pdf --pagesize unspecified -f "/tmp/tableau/xxxx.pdf"
A common cause of issues like this is environment variable changes between your interactive and crontab process. Add an env dump before running tabcmd similar to:
env | sort > /tmp/tabcmd_env.log
Keep a copy of the log based on your interactive session run of the script, then diff it compared to that of a crontab run.
Thanks for all guys! Well, ended up being more simple and i believe is related to env variables that the cron process use, but anyways.
I just used tabcmd from its location, like this:
For the record you can find tabcmd with the command whereis tabcmd
I'm pretty sure this will change with every tableau update so i'll have to update my program to take the value of the whereis.
I also used the --no-cookie option just in case, so every time tabcmd is issued it logs in.