Topic: How to run FA files using cron

As we know, To access frontaccounting code files, it is must to login. I want to execute a script automatic using the Cron. I manually tried it but every time it ask for login and after login it hit the script. But in cron, how to login automatically so after which it execute the script. Is there any way to run a FA file without login or remove security permissions in code. Please give me the solution for this  asap.

2 (edited by apmuthu 09/17/2016 03:13:22 pm)

Re: How to run FA files using cron

If the custom cron php file is in the FA web folder then anyone from outside too can execute it. Why would you want a security vulnerability?

If you wish to directly interact with the FA's DB tables, then write your own php file and keep it outside your webroot and include the relevant files like config_db.php, includes/db/connect_db.inc and operate on them directly.

If you wish to simulate a login and perform the FA's form based operations then use php cURL to achieve it. Teaching PHP is outside the scope of this forum.

Provide an example of what you wish to achieve and in which version of FA?

Re: How to run FA files using cron

It's a security break if you do it like this. But if you are doing it by your own pc or local system.  That's no problem.  If you want to do the cron job in it.  Each file has a security parameter.  Just make one like this.

 $page_security ="SA_OPEN"; 

// Here your code can go on. 

?>

You can use this file for corn job.  It will grant you the access.

Subscription service based on FA
HRM CRM POS batch Themes