Export Cron Job Reporting Access Denied

More
9 years 6 months ago - 9 years 6 months ago #2054 by Verulam Webmaster
Hi,

I have set up a Cron Jon link to run a SQl query and store the resulting CSV file on the local server. The SQL works OK (as a quick export) but when I use the URL I get this message:

{"result":"error", "error":"ACCESS_DENIED"}

I assume that it's when the CSV is trying to be written to the local server, but not sure by what user or what permissions are required.

Any ideas?

Thanks, Chris.
Last edit: 9 years 6 months ago by Verulam Webmaster.

Please Log in to join the conversation.

More
9 years 6 months ago #2055 by Daniel
Hi,
You can not execute Cron Job URL manually, It would work only when Cron Job on your server would trigger it.

Thanks
Daniel

Please Log in to join the conversation.

More
9 years 6 months ago #2057 by Verulam Webmaster
I understand now, thanks.

Please Log in to join the conversation.

More
9 years 6 months ago #2076 by Michael Ronayne
How do I submit the cron job. I know how to do this in general via my Cpanel cron control panel but using the URL link generated on my cron job produces a "file not found" error when the cron job attempts to run?

Am I missing something here?

Please Log in to join the conversation.

More
9 years 6 months ago #2079 by Verulam Webmaster
Hi Michael,

I'm a newbie myself, but when I got that error it was that the bash script that my provider 'VISAHOST' created, perhaps the response can help you too. I marked this as fixed when my issue was resolved so you might need open a new ticket for a response from the WDM guys.

The reason was due to the lines I was calling the URL with:

/usr/bin/wget -O /dev/null -o /dev/null

The following combined with a wget command till do:

-O write documents to FILE.
-o log messages to FILE

The cron is set up to run each of this tasks to the /dev/null directory, this directory is used to ignore all output written in it and as such you end up with an output of only the number of processes run from the query, or an error. Update these locations to where you want the file to go.

Chris

Please Log in to join the conversation.

More
9 years 6 months ago #2080 by Michael Ronayne
Chris,

Thank you for your input - that was all I needed to move forward. I've successfully created a cron job to execute the vData export that I was trying to run.

Regards,
Mike

Please Log in to join the conversation.

Cron Job Starts