How to setup schedulers and automatic backups ?

283 views
Skip to first unread message

Anand Doshi

unread,
Aug 30, 2012, 9:01:01 AM8/30/12
to erpnext-dev...@googlegroups.com
Hi HF,

Please do the following for enabling scheduler:

Foremost, check if cron is running. From terminal, run
service crond status

if it is not running,
service crond start

Then,
pull the latest updates from erpnext repository.

[assuming you have installed erpnext in the folder /var/www/erpnext - you will need to change it as per your installation, however, it must be an absolute path]

1. start terminal
2. crontab -e
3. enter this in the file

*/3 * * * * cd /var/www/erpnext/ && python lib/wnf.py --run_scheduler >> /var/log/erpnext-sch.log 2>&1

4. save the file
5. crontab -l
6. you should be able to see the above entry in the cron list. Now, your scheduler is set up.


To enable automatic backups, perform the above steps, with the following change in the 3rd step:

0 */6 * * * cd /var/www/erpnext/ && python lib/wnf.py --backup >> /var/log/erpnext-backup.log 2>&1


For testing, just copy and paste the part starting from "cd /var…". Then check both the log files for output. If any error comes, please paste it as a reply to this email, so that we can further analyse the problem.

thanks,
Anand.

HF

unread,
Aug 30, 2012, 9:59:48 AM8/30/12
to erpnext-dev...@googlegroups.com
Thank you Anand, I will try it.

Hisham

Rushabh Mehta

unread,
Aug 31, 2012, 12:18:02 AM8/31/12
to erpnext-dev...@googlegroups.com
Anand,

Cool - some quick thoughts 

1. Can we include the backups in the scheduler itself so there is no separate cron job required?
2. You can add this in the README too

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To unsubscribe from this group, send email to erpnext-developer...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages