A Andy.N Well-known member Aug 29, 2012 #1 I would like to create a cron job to run a sql query to collect post/threads/like in a certain forum and PM it to a few people. The cron job is scheduled for every Sunday. Does anyone know how do I go about it? Thanks
I would like to create a cron job to run a sql query to collect post/threads/like in a certain forum and PM it to a few people. The cron job is scheduled for every Sunday. Does anyone know how do I go about it? Thanks
Jake Bunce Well-known member Aug 30, 2012 #2 Admin CP -> Tools -> Cron Entries -> Create New Cron Entry Then you need to point it to a class and method for which you will need to create a PHP file. Upvote 0 Downvote
Admin CP -> Tools -> Cron Entries -> Create New Cron Entry Then you need to point it to a class and method for which you will need to create a PHP file.
A Andy.N Well-known member Aug 30, 2012 #3 Jake Bunce said: Admin CP -> Tools -> Cron Entries -> Create New Cron Entry Then you need to point it to a class and method for which you will need to create a PHP file. Click to expand... Way over my head, Jake. Any examples to get started? I was googling to help myself and it looks like just writing a script on the server and create a cron job would be easier? Upvote 0 Downvote
Jake Bunce said: Admin CP -> Tools -> Cron Entries -> Create New Cron Entry Then you need to point it to a class and method for which you will need to create a PHP file. Click to expand... Way over my head, Jake. Any examples to get started? I was googling to help myself and it looks like just writing a script on the server and create a cron job would be easier?
Jake Bunce Well-known member Aug 30, 2012 #4 If you look at the other crons then there are good code examples to follow. Upvote 0 Downvote
A Andy.N Well-known member Aug 30, 2012 #5 Jake Bunce said: Admin CP -> Tools -> Cron Entries -> Create New Cron Entry Then you need to point it to a class and method for which you will need to create a PHP file. Click to expand... Hi Jake, Here is the very simple piece of code I found online that does the queries and email SQL result as CSV attachment. http://www.studio-owens.com/code/email-mysql-query-results-as-a-csv-file-attachment.htm Would really appreciate if you can help with the steps of how to create a cron job that will run every Sunday. Thanks very much. Upvote 0 Downvote
Jake Bunce said: Admin CP -> Tools -> Cron Entries -> Create New Cron Entry Then you need to point it to a class and method for which you will need to create a PHP file. Click to expand... Hi Jake, Here is the very simple piece of code I found online that does the queries and email SQL result as CSV attachment. http://www.studio-owens.com/code/email-mysql-query-results-as-a-csv-file-attachment.htm Would really appreciate if you can help with the steps of how to create a cron job that will run every Sunday. Thanks very much.
A Andy.N Well-known member Aug 31, 2012 #6 The sample code above provides everything I need. I set up a cronjob and get it working they way I want. Thanks for your help, Jake. Upvote 0 Downvote
The sample code above provides everything I need. I set up a cronjob and get it working they way I want. Thanks for your help, Jake.
ProCom Well-known member Oct 23, 2013 #7 Hey @Andy.N can you help the rest of us newbies and write up what you did? Let's say I want to run a VERY simple command every night at 9m EST: cp file1.zip file2.zip How would I set this up to run via xF admin panel? The "Cron Callback:" confuses the heck out of me. @Andy.N you mentioned the code provided everything you needed, but where did you put the code and how did you setup the cron? Thanks! Upvote 0 Downvote
Hey @Andy.N can you help the rest of us newbies and write up what you did? Let's say I want to run a VERY simple command every night at 9m EST: cp file1.zip file2.zip How would I set this up to run via xF admin panel? The "Cron Callback:" confuses the heck out of me. @Andy.N you mentioned the code provided everything you needed, but where did you put the code and how did you setup the cron? Thanks!